ThreadPool.shutdown

void shutdown(bool waitForTasks = true) @trusted

Initiate 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

waitForTasksIf true, workers finish queued tasks before exiting.