Ejemplo n.º 1
0
 internal void QueueReady(PusherQueue pusherQueue)
 {
     lock (this.syncRoot)
     {
         this.readyQueue.Enqueue(pusherQueue);
         this.StartPusherThread();
     }
 }
Ejemplo n.º 2
0
        private PusherQueue GetNextQueue(int taskCount, out bool wasPusherThreadActiveFlagReset)
        {
            PusherQueue result;

            lock (this.syncRoot)
            {
                PusherQueue pusherQueue = null;
                wasPusherThreadActiveFlagReset = false;
                if (taskCount < 10000 && this.readyQueue.Count > 0)
                {
                    pusherQueue = this.readyQueue.Dequeue();
                }
                else
                {
                    this.isPusherThreadActive      = 0;
                    wasPusherThreadActiveFlagReset = true;
                }
                result = pusherQueue;
            }
            return(result);
        }