Apache.NMS.ActiveMQ.QueueBrowser.WaitForMessage C# (CSharp) Method

WaitForMessage() protected method

protected WaitForMessage ( ) : void
return void
        protected void WaitForMessage()
        {
            try
            {
                lock(semaphore)
                {
                    Monitor.Wait(semaphore, 2000);
                }
            }
            catch(ThreadInterruptedException)
            {
                Thread.CurrentThread.Interrupt();
            }
        }