private void StopNotificationThread()
{
// first check to see if an exception has
// been thrown by the notification thread.
if (_notificationException != null)
{
throw _notificationException;
}
_notificationThreadStopCount++;
if (_notificationThreadStopCount == 1) // If this call was the first to increment.
{
Monitor.Enter(_socket);
}
}