Apache.NMS.ActiveMQ.Util.SimplePriorityMessageDispatchChannel.Stop C# (CSharp) Method

Stop() public method

public Stop ( ) : void
return void
        public void Stop()
        {
            lock(mutex)
            {
                this.running = false;
                Monitor.PulseAll(this.mutex);
            }
        }

Usage Example

 public void TestStop() 
 {
     SimplePriorityMessageDispatchChannel channel = new SimplePriorityMessageDispatchChannel();
     channel.Start();
     Assert.IsTrue( channel.Running == true );
     channel.Stop();
     Assert.IsTrue( channel.Running == false );
 }