From 174b0388e7d492e7a1926d70d77452b55c399a6e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 3 Dec 2024 12:51:24 -0800 Subject: [PATCH] Explicitly define pool cores. --- src/lib/pool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pool.ts b/src/lib/pool.ts index 1baf3ad..d64cd7d 100644 --- a/src/lib/pool.ts +++ b/src/lib/pool.ts @@ -19,7 +19,7 @@ type Thread = { */ export class Pool { #approach: 'converge' | 'divide' = 'divide' - #cores: number = Math.max(1, navigator.hardwareConcurrency ?? 1 - 1) + #cores: number = Math.max(1, (navigator.hardwareConcurrency || 1) - 1) #queue: object[] = [] #resolve: Function = (value: unknown): void => { } #results: object[] = [] -- 2.34.1