Need a sample template from one manufacturer / one consumer with new features of .NET 4.0

.NET to add new concurrency functions to System.Collection.Concurrent and some synchronization classes. Is there a good example for one manufacturer - one consumer template using this feature? (In fact, I will add a circular buffer pattern to it if it no longer implements it as a shared buffer)

+3
source share
1 answer

The new type BlockingCollection<T>( see MSDN ) implements the producer / consumer pattern. Several manufacturers / consumers can contact them at the same time, but it will work perfectly with one manufacturer and consumer.

+2
source

Source: https://habr.com/ru/post/1771409/


All Articles