ThreadPool.create

ThreadPool create(size_t numWorkers = 0, size_t queueCapacity = 1024) @trusted

Create a new thread pool with the specified number of workers.

Parameters

numWorkersNumber of worker threads to create. Must be at least 1.
queueCapacityMaximum number of queued tasks. Use 0 for unbounded.

Returns

A new ThreadPool instance ready to be started.