BlockingQueue

Reactor aware fixed size queue.

Unlike mecca.container.queue, this queue does not assert when an operation cannot be fulfilled. Instead, it blocks the calling fiber until the operation can be completed.

Members

Functions

pop
Type pop(Timeout timeout)

Pop a single element from the queue

push
Type* push(Timeout timeout)

Pushes an uninitialized item to the queue.

push
void push(Type item, Timeout timeout)

Add an item to the queue.

pushWaitersQueueWaitForHead
void pushWaitersQueueWaitForHead(Timeout timeout)

Wait until all current fibers waiting to push have done so.

Properties

empty
bool empty [@property getter]

Returns true if no items are currenlty queued.

full
bool full [@property getter]

Returns true if trying to add a new item would block.

Parameters

Type

the item type to be used.

MaxItems

the queue's capacity.

Meta