views:

216

answers:

2

Does .NET 4 Parallel Extensions include an implementation of a lock-free Producer/Consumer queue? Is there any class or interface to implement which could help me to implement this pattern correctly?

Thanks!

+1  A: 

I don't believe .NET 4.0 will ship with this, but you can follow Joe Duffy's blog post "Fast synchronization between a single producer and single consumer" to build one yourself.

bobbymcr
A: 

BlockingCollection can be used to implement that pattern.

Steve