ThreadPool.trySubmit

SubmitResult trySubmit(Task task) @trusted

Try to submit a task without blocking.

Parameters

taskThe delegate to execute.

Returns

SubmitResult.SUCCESS if the task was queued,

SubmitResult.QUEUE_FULL if the queue is at capacity, SubmitResult.REJECTED if the pool is not accepting tasks.