Struct BlockingQueue

Reactor aware fixed size queue.

struct BlockingQueue(Type, ushort MaxItems) ;

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.

Properties

NameTypeDescription
empty[get] boolReturns true if no items are currenlty queued.
full[get] boolReturns true if trying to add a new item would block.

Methods

NameDescription
pop Pop a single element from the queue
push Add an item to the queue.
push Pushes an uninitialized item to the queue.
pushWaitersQueueWaitForHead Wait until all current fibers waiting to push have done so.

Parameters

NameDescription
Type the item type to be used.
MaxItems the queue's capacity.