From ed6ca7167e75f62432164df316a7144020d623b6 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 5 Dec 2024 22:03:45 -0800 Subject: [PATCH] Limit Pool to one worker until the class can be refactored to manage threads on a static basis so we don't overload the browser with hundreds of workers during testing. --- src/lib/pool.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/pool.ts b/src/lib/pool.ts index 49e1188..7ce8974 100644 --- a/src/lib/pool.ts +++ b/src/lib/pool.ts @@ -11,7 +11,8 @@ type Thread = { */ export class Pool { #approach: 'converge' | 'divide' = 'divide' - #cores: number = Math.max(1, navigator.hardwareConcurrency - 1) + // #cores: number = Math.max(1, navigator.hardwareConcurrency - 1) + #cores: number = 1 #queue: object[] = [] #resolve: Function = (value: unknown): void => { } #results: object[] = [] -- 2.34.1