private volatile int messageDeliveryPumpLoopIsRunning = 0; // 0 = false, 1 = true public ConcurrentQueue(ushort queueID, QueueLogWriter logWriter) { QueueID = queueID; this.logWriter = logWriter; messageDeliveryPumpSignalWaitHandle = ThreadPool.RegisterWaitForSingleObject(messageDeliveryPumpSignal, (state, timedOut) => MessageDeliveryPumpLoop(), null, -1, false); messageDeliveryPumpSignal.Set(); // signal to start pump right away logWriter.WriteCreated(this); }
private HostContainer() { ContainerId = Guid.NewGuid().ToString(); // TODO: Generate once and then persist? logWriter = new QueueLogWriter(); }