/// <summary>
        /// Stop the dispatcher.
        /// </summary>
        public void Stop()
        {
            log.Info(
                "WorkItemDispatcher stopping\r\n\tDispatched {0} items\r\n\tMax Queue Length: {1}",
                _itemsDispatched,
                _readyQueue.MaxCount);

            _readyQueue.Stop();
#if STA_QUEUE
            _staQueue.Stop();
#endif
        }
Example #2
0
 public void TearDown()
 {
     _queue.Stop();
 }
Example #3
0
 public void StopQueue_NoWorkers()
 {
     _queue.Start();
     _queue.Stop();
     Assert.That(_queue.State, Is.EqualTo(WorkItemQueueState.Stopped));
 }
Example #4
0
 public void StopQueue()
 {
     _queue.Start();
     _queue.Stop();
     Assert.That(_queue.State, Is.EqualTo(WorkItemQueueState.Stopping));
 }