Classes | |
class | hasMemoryUsed |
Typedefs | |
typedef size_t | MemoryType |
Functions | |
template<typename T > | |
MemoryType | memoryUsage (const std::pair< T, size_t > &t) |
template<typename T > | |
std::enable_if< hasMemoryUsed < T >::value, MemoryType > ::type | memoryUsage (const T &t) |
Class template ConcurrentQueue provides a FIFO that can be used to communicate data between multiple producer and consumer threads in an application.
The template policy EnqPolicy determines the behavior of the enqNowait function. In all cases, this function will return promptly (that is, it will not wait for a full queue to become not-full). However, what is done in the case of the queue being full depends on the policy chosen:
FailIfFull: a std::exeption is thrown if the queue is full.
KeepNewest: the head of the FIFO is popped (and destroyed), and the new item is added to the FIFO. The function returns the number of popped (dropped) element.
RejectNewest: the new item is not put onto the FIFO. The function returns the dropped event count (1) if the item cannot be added.