Comparing version 0.1.1 to 0.1.2
@@ -168,3 +168,3 @@ import { | ||
minThreads: Math.max(cpuCount / 2, 1), | ||
maxThreads: cpuCount * 1.5, | ||
maxThreads: cpuCount, | ||
idleTimeout: 0, | ||
@@ -473,2 +473,7 @@ maxQueue: Infinity, | ||
} | ||
_ensureMaximumWorkers() { | ||
while (this.workers.size < this.options.maxThreads) { | ||
this._addNewWorker(); | ||
} | ||
} | ||
_ensureMinimumWorkers() { | ||
@@ -623,3 +628,3 @@ while (this.workers.size < this.options.minThreads) { | ||
this._removeWorker(taskInfo.workerInfo); | ||
this._ensureMinimumWorkers(); | ||
this._ensureMaximumWorkers(); | ||
} | ||
@@ -626,0 +631,0 @@ } |
{ | ||
"name": "tinypool", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A minimal and tiny Node.js Worker Thread Pool implementation, a fork of piscina, but with fewer features", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
38474
1153