"benchmark": "npm run build && node -r source-map-support/register benchmarks/bench.js",
"benchmark:debug": "npm run build && node -r source-map-support/register --inspect benchmarks/bench.js",
"benchmark:prod": "npm run build:prod && node -r source-map-support/register benchmarks/bench.js",
- "test": "npm run build && nyc mocha -r source-map-support/register --exit --timeout 20000 'tests/**/*.test.js'",
+ "test": "npm run build && nyc mocha -r source-map-support/register --exit --timeout 20000 --parallel 'tests/**/*.test.js'",
"test:debug": "npm run build && mocha -r source-map-support/register --inspect --exit --timeout 20000 'tests/**/*.test.js'",
"test:prod": "npm run build:prod && nyc mocha -r source-map-support/register --exit --timeout 20000 'tests/**/*.test.js'",
"sonar": "sonar-scanner",
tasksInProgress === 0
) {
// Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime)
- this.sendToWorker(workerCreated, { kill: 1 })
void this.destroyWorker(workerCreated)
}
})
tasksInProgress === 0
) {
// Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime)
- this.sendToWorker(workerCreated, { kill: 1 })
void this.destroyWorker(workerCreated)
}
})
protected async destroyWorker (
worker: ThreadWorkerWithMessageChannel
): Promise<void> {
+ this.sendToWorker(worker, { kill: 1 })
await worker.terminate()
}