예제 #1
0
 public T Dequeue()
 {
     lock (Locker)
     {
         if (InnerQueue.Count == 0)
         {
             return(null);
         }
         return(InnerQueue.Dequeue());
     }
 }
예제 #2
0
 public void Dequeue(out T t)
 {
     lock (Locker)
     {
         if (InnerQueue.Count == 0)
         {
             t = null;
         }
         else
         {
             t = InnerQueue.Dequeue();
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Retrieve a value from the queue
 /// </summary>
 /// <param name="flags">Flags to pass to Redis</param>
 /// <returns>The head element or null if the queue is empty</returns>
 public T Dequeue(CommandFlags flags = CommandFlags.None)
 {
     return(InnerQueue.Dequeue(flags));
 }