Better default worker count value
This commit is contained in:
parent
05a780c4a9
commit
1b48c34974
@ -24,7 +24,7 @@ export class WorkerPool {
|
||||
this.availableWorkers = [];
|
||||
}
|
||||
|
||||
public async init(count: number = 8): Promise<WorkerPool> {
|
||||
public async init(count: number = window.navigator.hardwareConcurrency ?? 8): Promise<WorkerPool> {
|
||||
this.availableWorkers = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
this.availableWorkers.push(await this.createWorker());
|
||||
|
Loading…
Reference in New Issue
Block a user