From: Chris Duncan Date: Fri, 6 Dec 2024 06:03:45 +0000 (-0800) Subject: Limit Pool to one worker until the class can be refactored to manage threads on a... X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=ed6ca7167e75f62432164df316a7144020d623b6;p=libnemo.git 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. --- 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[] = []