SCMPQueue

Single consumer multiple producers queue

Members

Functions

addProducer
void addProducer()

Register number of producers

addProducers
void addProducers(size_t numProducers)

Register number of producers

pop
bool pop(T result)

Pop a value from the queue

push
bool push(T data)

push a value into the queue.

Properties

effectiveCapacity
size_t effectiveCapacity [@property getter]

Report the effective capacity of the queue.

isFull
bool isFull [@property getter]

Report whether the queue is currently full.

Parameters

T

the type handled by the queue. Must be one that supports atomic operations.

size

the number of raw elements in the queue (actual queue size will be somewhat smaller). Must be a power of 2.

Meta