internal void Stop() { mStopEvent.Set(); mQueueConsumer.ReleaseReader(); mStaThread.Join(); mQueueConsumer.Dispose(); }
internal void Stop() { _stopEvent.Set(); _consumerQueue.ReleaseReader(); _staThread.Join(); _consumerQueue.Dispose(); }
internal void Stop() { _manualResetEvent.Set(); _queueConsumer.ReleaseReader(); _staThread.Join(); _queueConsumer.Dispose(); }
private void Run() { SynchronizationContext.SetSynchronizationContext(syncContext); while (true) { bool stop = mStopEvent.WaitOne(0); if (stop) { mQueueConsumer.Dispose(); break; } SendOrPostCallbackItem workItem = mQueueConsumer.Dequeue(); if (workItem != null) { workItem.Execute(); } } }