What are the differences between ConcurrentQueue and BlockingCollection in .Net?

BlockingCollection has a Take method that would block the consumer if there is nothing to take, and wait for a producer side to provide an item. ConcurrentQueue lacks such method – if it is empty, the consumer would need to handle the wait, and the producer would need to provide a non-empty notification.

Leave a Comment