TTaskPoolServer.taskPool

Sets the task pool to use.

By default, the global std.parallelism taskPool instance is used, which might not be appropriate for many applications, e.g. where tuning the number of worker threads is desired. (On single-core systems, a private task pool with a single thread is used by default, since the global taskPool instance has no worker threads then.)

Note: TTaskPoolServer expects that tasks are never dropped from the pool, e.g. by calling TaskPool.close() while there are still tasks in the queue. If this happens, serve() will never return.

class TTaskPoolServer
@property
void
taskPool
(
TaskPool pool
)

Meta