WorkQueue.tryPush

QueueStatus tryPush(WorkItem item) @trusted

Try to push a work item without blocking.

Parameters

itemThe work item to push.

Returns

QueueStatus.SUCCESS if the item was pushed,

QueueStatus.FULL if the queue is at capacity, QueueStatus.CLOSED if the queue has been closed.

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

ditto