#include <CircularQueue.h>
This is a lock-free (but not wait-free) multi-producer multi-consumer implementation of a circular queue matching the ThreadAccessPolicy of CircularQueue.
Protected Attributes | |
AtomicInt | head |
AtomicInt | tail |
Protected Member Functions | |
ManyThreadsPerEnd () | |
bool | isEmpty (unsigned maxSize) const |
bool | isFull (unsigned maxSize) const |
unsigned | size (unsigned maxSize) const |
void | init (AtomicInt array[], int maxCapacity) |
bool | push (AtomicInt array[], int maxSize, int maxCapacity, const AtomicInt &item) |
bool | pop (AtomicInt array[], int maxSize, int maxCapacity, AtomicInt &item, bool clear=true) |
unsigned | skip (AtomicInt array[], int maxSize, int maxCapacity, unsigned outmaxsize, bool clear=true) |
template<class OutputIterator > | |
unsigned | pop (AtomicInt array[], int maxSize, int maxCapacity, OutputIterator out, unsigned outmaxsize, bool clear=true) |
|
protected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |