Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
this.registerWorkerMessageListener(createdWorker, message => {
if (
isKillBehavior(KillBehaviors.HARD, message.kill) ||
- this.getWorkerTasksUsage(createdWorker)?.running === 0
+ (message.kill != null &&
+ this.getWorkerTasksUsage(createdWorker)?.running === 0)
) {
// Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime)
void this.destroyWorker(createdWorker)
*/
public constructor (
min: number,
- private readonly max: number,
+ public readonly max: number,
filePath: string,
opts: ClusterPoolOptions = {}
) {
*/
public constructor (
min: number,
- private readonly max: number,
+ public readonly max: number,
filePath: string,
opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
) {