예제 #1
0
 public virtual void TearDown()
 {
     Queue.Stop();
     Queue = null;
     Consumer.Dispose();
     Consumer = null;
 }
예제 #2
0
 public void Stop()
 {
     if (_subsystemStarted)
     {
         if (_masterInputQueue != null)
         {
             _masterInputQueue.Stop();
         }
         foreach (var queue in _coreQueues)
         {
             queue.Value.Stop();
         }
     }
     _subsystemStarted = false;
 }
예제 #3
0
        private void EnqueueMessage(Message message)
        {
            if (message is StorageMessage.IFlushableMessage)
            {
                Interlocked.Increment(ref FlushMessagesInQueue);
            }

            StorageWriterQueue.Publish(message);

            if (message is SystemMessage.BecomeShuttingDown)
            // we need to handle this message on main thread to stop StorageWriterQueue
            {
                StorageWriterQueue.Stop();
                BlockWriter = true;
                Bus.Publish(new SystemMessage.ServiceShutdown("StorageWriter"));
            }
        }