WorkQueue.push

QueueStatus push(WorkItem item) @trusted

Push a work item onto the queue, blocking if full.

For unbounded queues, this never blocks due to capacity.

Parameters

itemThe work item to push.

Returns

QueueStatus — success, or a QueueError payload with

QueueErrorReason.CLOSED when the queue has been closed.

QueueStatus push(void delegate() @safe task, string name = null) @trusted

ditto