ThreadPool.shutdown
void shutdown(bool waitForTasks = true) @trustedInitiate graceful shutdown of the thread pool.
After this call, no new tasks will be accepted. Workers will continue processing queued tasks until the queue is empty (if waitForTasks is true) or stop immediately.
Parameters
waitForTasks | If true, workers finish queued tasks before exiting. |