public readonly emitter?: PoolEmitter
/**
- * The task execution response promise map.
- *
+ * The task execution response promise map:
* - `key`: The message id of each submitted task.
* - `value`: An object that contains the worker, the execution response promise resolve and reject callbacks.
*
...{
size: Math.pow(this.maxSize, 2),
concurrency: 1,
- tasksStealing: true,
+ taskStealing: true,
tasksStealingOnBackPressure: true
},
...tasksQueueOptions
(this.opts.tasksQueueOptions?.concurrency as number)
) === -1
)
- } else {
- return (
- this.workerNodes.findIndex(
- workerNode =>
- workerNode.info.ready && workerNode.usage.tasks.executing === 0
- ) === -1
- )
}
+ return (
+ this.workerNodes.findIndex(
+ workerNode =>
+ workerNode.info.ready && workerNode.usage.tasks.executing === 0
+ ) === -1
+ )
}
/** @inheritDoc */
// Send the statistics message to worker.
this.sendStatisticsMessageToWorker(workerNodeKey)
if (this.opts.enableTasksQueue === true) {
- if (this.opts.tasksQueueOptions?.tasksStealing === true) {
+ if (this.opts.tasksQueueOptions?.taskStealing === true) {
this.workerNodes[workerNodeKey].onEmptyQueue =
this.taskStealingOnEmptyQueue.bind(this)
}