Template Class MPMCQueue
Defined in File MPMCQueue.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class MPMCQueue a bounded queue of many producers and many consumers
Public Functions
-
explicit MPMCQueue(std::size_t capacity)
an empty queue of the given capacity
- Pre:
capacity >= 2 is a power of 2
-
~MPMCQueue()
destroys the items left
-
template<class ...Args>
bool emplace(Args&&... args) enqueues the item built from args, false if the queue is full (and then nothing is built); any thread may call it
-
std::size_t size(void) const
the number of items at some moment of the call, at most the capacity
-
inline bool empty(void) const
true if the queue held no item at some moment of the call
-
inline std::size_t capacity(void) const
-
explicit MPMCQueue(std::size_t capacity)