Ejemplo n.º 1
0
        public void EndDequeue()
        {
            if (isDequeueing)
            {
                lock (queueLock)
                {
                    queue.Dequeue();

                    isDequeueing = false;
                }
            }
        }
Ejemplo n.º 2
0
        public T BeginDequeue()
        {
            if (!isDequeueing)
            {
                lock (queueLock)
                {
                    if (queue.Count > 0)
                    {
                        isDequeueing = true;

                        return(queue.Peek());
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
 public void CancelDequeue()
 {
     isDequeueing = false;
 }