concurrentqueue
concurrentqueue copied to clipboard
BlockingConcurrentQueue How do I delete all tasks
Dequeue them all.
If you know the queue is not being accessed concurrently by other threads, you can also start fresh like so:
ConcurrentQueue<int> q;
...
q = ConcurrentQueue<int>();
I see the ~ConcurrentQueue() destructor that performs a variety of clean-up tasks, so this makes sense to me.