}
/**
- * The pool readiness boolean status.
+ * Whether the pool is ready or not.
+ * @returns The pool readiness boolean status.
*/
private get ready (): boolean {
if (this.empty) {
}
/**
- * The pool emptiness boolean status.
+ * Whether the pool is empty or not.
+ * @returns The pool emptiness boolean status.
*/
protected get empty (): boolean {
return this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0
/**
* Whether the pool is full or not.
- *
- * The pool filling boolean status.
+ * @returns The pool fullness boolean status.
*/
protected get full (): boolean {
return (
/**
* Whether the pool is busy or not.
- *
- * The pool busyness boolean status.
+ * @returns The pool busyness boolean status.
*/
protected abstract get busy (): boolean
return new Set([
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.opts.workerChoiceStrategy!,
- ...(this.listTaskFunctionsProperties()
+ ...this.listTaskFunctionsProperties()
.map(
(taskFunctionProperties: TaskFunctionProperties) =>
taskFunctionProperties.strategy
)
.filter(
(strategy: WorkerChoiceStrategy | undefined) => strategy != null
- ) as WorkerChoiceStrategy[]),
+ ),
])
}
})
}
-
/** @inheritDoc */
public mapExecute (
data: Iterable<Data>,
* @param initWorkerNodeUsage - Whether to initialize the worker node usage or not. @defaultValue false
*/
private startMinimumNumberOfWorkers (initWorkerNodeUsage = false): void {
+ if (this.minimumNumberOfWorkers === 0) {
+ return
+ }
this.startingMinimumNumberOfWorkers = true
while (
this.workerNodes.reduce(