Пример #1
0
 internal void Stop()
 {
     mStopEvent.Set();
     mQueueConsumer.ReleaseReader();
     mStaThread.Join();
     mQueueConsumer.Dispose();
 }
Пример #2
0
 internal void Stop()
 {
     _stopEvent.Set();
     _consumerQueue.ReleaseReader();
     _staThread.Join();
     _consumerQueue.Dispose();
 }
 internal void Stop()
 {
     _manualResetEvent.Set();
     _queueConsumer.ReleaseReader();
     _staThread.Join();
     _queueConsumer.Dispose();
 }
Пример #4
0
        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();
                }
            }
        }