Exemplo n.º 1
0
 public void Enqueue(WalkRequest walkRequest)
 {
     lock (queueLock)
     {
         lastEnqueueTimeStamp = DateTime.UtcNow;
         queue.Enqueue(walkRequest);
     }
 }
Exemplo n.º 2
0
        public bool TryDequeue(out WalkRequest walkRequest)
        {
            lock (queueLock)
            {
                if (queue.Count == 0)
                {
                    walkRequest = default(WalkRequest);
                    return(false);
                }

                walkRequest = queue.Dequeue();
                return(true);
            }
        }