@matrixai/workers
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -30,3 +30,3 @@ import type { ModuleThread } from 'threads'; | ||
cores?: number; | ||
logger?: Logger; | ||
logger: Logger; | ||
}); | ||
@@ -33,0 +33,0 @@ get running(): boolean; |
@@ -32,3 +32,3 @@ "use strict"; | ||
this._destroyed = false; | ||
this.logger = logger ?? new logger_1.default(this.constructor.name); | ||
this.logger = logger; | ||
this.pool = threads_1.Pool(workerFactory, cores); | ||
@@ -47,3 +47,3 @@ this._running = true; | ||
*/ | ||
static async createWorkerManager({ workerFactory, cores, logger, }) { | ||
static async createWorkerManager({ workerFactory, cores, logger = new logger_1.default(this.name), }) { | ||
const workerManager = new WorkerManager({ | ||
@@ -50,0 +50,0 @@ workerFactory, |
{ | ||
"name": "@matrixai/workers", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": "Roger Qiu", | ||
@@ -5,0 +5,0 @@ "description": "Multithreaded Workers", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30888