Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BlockingCollection: C++11 thread safe collection class

20 views
Skip to first unread message

gm127

unread,
Oct 9, 2018, 8:04:25 AM10/9/18
to
BlockingCollection is a C++11 thread safe collection class that provides the following features:

- Implementation of classic Producer/Consumer pattern (i.e. condition variable, mutex);
- Concurrent adding and taking of items from multiple threads.
- Optional maximum capacity.
- Insertion and removal operations that block when collection is empty or full.
- Insertion and removal "try" operations that do not block or that block up to a specified period of time.
- Insertion and removal 'bulk" operations that allow more than one element to be added or taken at once.
- Priority-based insertion and removal operations.
- Encapsulates any collection type that satisfy the ProducerConsumerCollection requirement.
- Minimizes sleeps, wake ups and lock contention by managing an active subset of producer and consumer threads.
- Pluggable condition variable and lock types.
- Range-based loop support.

https://github.com/CodeExMachina/BlockingCollection
0 new messages