public void Stop() { lock(mutex) { this.running = false; Monitor.PulseAll(this.mutex); } }
public void TestStop() { SimplePriorityMessageDispatchChannel channel = new SimplePriorityMessageDispatchChannel(); channel.Start(); Assert.IsTrue( channel.Running == true ); channel.Stop(); Assert.IsTrue( channel.Running == false ); }