public void AddToQueue(Guid key, ClientMessage.WriteEvents message)
            {
                WriterQueue writerQueue;

                if (!_queues.TryGetValue(key, out writerQueue))
                {
                    writerQueue = new WriterQueue();
                    _queues.Add(key, writerQueue);
                }
                writerQueue.Enqueue(message);
            }
示例#2
0
 private void CleanupQueue(Guid key, WriterQueue queue)
 {
     if (queue.IsBusy)
     {
         return;
     }
     if (queue.Count > 0)
     {
         return;
     }
     _queues.Remove(key);
 }