]> zoso.dev Git - libnemo.git/commitdiff
Limit Pool to one worker until the class can be refactored to manage threads on a...
authorChris Duncan <chris@zoso.dev>
Fri, 6 Dec 2024 06:03:45 +0000 (22:03 -0800)
committerChris Duncan <chris@zoso.dev>
Fri, 6 Dec 2024 06:03:45 +0000 (22:03 -0800)
src/lib/pool.ts

index 49e1188722ac08dfd167c4edebcb2c743cdb65b6..7ce89744c5288b5fd4b95ec2e1724f3282c455ca 100644 (file)
@@ -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[] = []