How to clear the ConcurrentBag? it don\'t have any method like Clear or RemoveAll...
ConcurrentBag
Clear
RemoveAll
int cnt = _queue.Count; for (; cnt > 0; cnt--) { _queue.TryDequeue(out img); }
It does not fall into an infinite loop, and clears the contents of the present time.