SubmitStatus — success if the task was queued, or a
SubmitError payload (SubmitErrorReason.REJECTED) if the pool is not accepting tasks.
SubmitStatus submit(Task task) @trustedSubmit a task for execution by the thread pool.
The task will be queued and executed by an available worker thread. If the queue is full, this method blocks until space is available (unless the pool is shutting down).
task | The delegate to execute. |
SubmitStatus — success if the task was queued, or a
SubmitError payload (SubmitErrorReason.REJECTED) if the pool is not accepting tasks.