From cc5065999da6bae0caa463848ce4612d65484316 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 3 Jul 2023 22:55:04 +0200 Subject: [PATCH] fix: fix availableParallelism() usage for min pool size MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/worker/WorkerConstants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/WorkerConstants.ts b/src/worker/WorkerConstants.ts index 4e0bce1f..e7572db3 100644 --- a/src/worker/WorkerConstants.ts +++ b/src/worker/WorkerConstants.ts @@ -8,7 +8,7 @@ export class WorkerConstants { public static readonly DEFAULT_ELEMENT_START_DELAY = 0; public static readonly DEFAULT_WORKER_START_DELAY = 500; public static readonly POOL_MAX_INACTIVE_TIME = 60000; - public static readonly DEFAULT_POOL_MIN_SIZE = availableParallelism() / 2; + public static readonly DEFAULT_POOL_MIN_SIZE = Math.floor(availableParallelism() / 2); public static readonly DEFAULT_POOL_MAX_SIZE = availableParallelism(); public static readonly DEFAULT_ELEMENTS_PER_WORKER = 1; -- 2.34.1