@matrixai/workers
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -18,3 +18,3 @@ import type { ModuleThread } from 'threads'; | ||
*/ | ||
static createWorkerManager<W extends ModuleMethods>({ workerFactory, cores, logger }: { | ||
static createWorkerManager<W extends ModuleMethods>({ workerFactory, cores, logger, }: { | ||
workerFactory: () => Promise<ModuleThread<W>>; | ||
@@ -21,0 +21,0 @@ cores?: number; |
@@ -46,7 +46,7 @@ "use strict"; | ||
*/ | ||
static async createWorkerManager({ workerFactory, cores, logger }) { | ||
static async createWorkerManager({ workerFactory, cores, logger, }) { | ||
const workerManager = new WorkerManager({ | ||
workerFactory, | ||
cores, | ||
logger | ||
logger, | ||
}); | ||
@@ -61,31 +61,2 @@ return workerManager; | ||
} | ||
// public async start({ | ||
// workerFactory, | ||
// cores, | ||
// }: { | ||
// workerFactory: () => Promise<ModuleThread<W>>; | ||
// cores?: number; | ||
// }) { | ||
// try { | ||
// if (this._started) { | ||
// return; | ||
// } | ||
// this.logger.info('Starting WorkerManager'); | ||
// this._started = true; | ||
// this.pool = Pool(workerFactory, cores); | ||
// this.logger.info(`Started WorkerManager`); | ||
// } catch (e) { | ||
// this._started = false; | ||
// throw e; | ||
// } | ||
// } | ||
// public async stop() { | ||
// if (!this._started) { | ||
// return; | ||
// } | ||
// this.logger.info('Stopping WorkerManager'); | ||
// await this.pool.terminate(); | ||
// this._started = false; | ||
// this.logger.info('Stopped WorkerManager'); | ||
// } | ||
async destroy() { | ||
@@ -92,0 +63,0 @@ if (this._destroyed) { |
{ | ||
"name": "@matrixai/workers", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"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
30911
280