From 353948d426ef8e62944f0ef903ce0699fdbc24c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 14 Jan 2021 22:21:50 +0100 Subject: [PATCH] Add workerTaskPool property to access the default task pool. --- source/vibe/core/core.d | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index bfe1e32..231f93c 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -721,6 +721,18 @@ public void setupWorkerThreads(uint num = logicalProcessorCount()) } +/** Returns the default worker task pool. + + This pool is used by `runWorkerTask`, `runWorkerTaskH` and + `runWorkerTaskDist`. +*/ +@property shared(TaskPool) workerTaskPool() +{ + setupWorkerThreads(); + return st_workerPool; +} + + /** Determines the number of logical processors in the system.