ThreadPool.trySubmit

SubmitStatus trySubmit(Task task) @trusted

Try to submit a task without blocking.

Parameters

taskThe delegate to execute.

Returns

SubmitStatus — success if the task was queued, or a

SubmitError payload: SubmitErrorReason.QUEUE_FULL if the queue is at capacity, SubmitErrorReason.REJECTED if the pool is not accepting tasks.