The TryDequeue
in ConcurrentQueue<T>
will return false if no items in queue.
If the queue is empty I need that my queue will wait until new item to be added in queue and it dequeue that new one, and the process will continues like that.
Should I use Monitor.Enter
, Wait
, Pulse
or any better options in C# 4.0?
true
) or the queue is empty and explicitly shut down (returningfalse
) – Brosy