protected void PulseSemaphore() { if (messageReceivedEventHandle != null) { messageReceivedEventHandle.Set(); } semaphore.PulseAll(); }