public virtual void TearDown() { Queue.Stop(); Queue = null; Consumer.Dispose(); Consumer = null; }
public void Stop() { if (_subsystemStarted) { if (_masterInputQueue != null) { _masterInputQueue.Stop(); } foreach (var queue in _coreQueues) { queue.Value.Stop(); } } _subsystemStarted = false; }
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")); } }