this.getWorkerInfo(workerNodeKey).ready = false
}
- /** @inheritDoc */
- public hasWorkerNodeBackPressure (workerNodeKey: number): boolean {
- return (
- this.opts.enableTasksQueue === true &&
- this.workerNodes[workerNodeKey].hasBackPressure()
- )
- }
-
private hasBackPressure (): boolean {
return (
this.opts.enableTasksQueue === true &&
* @internal
*/
readonly workerNodes: Array<IWorkerNode<Worker, Data>>
- /**
- * Whether the worker node has back pressure (i.e. its tasks queue is full).
- *
- * @param workerNodeKey - The worker node key.
- * @returns `true` if the worker node has back pressure, `false` otherwise.
- * @internal
- */
- readonly hasWorkerNodeBackPressure: (workerNodeKey: number) => boolean
/**
* Event emitter integrated with async resource on which events can be listened to.
* The async tracking tooling identifier is `poolifier:<PoolType>-<WorkerType>-pool`.
protected readonly pool: IPool<Worker, Data, Response>,
protected opts?: WorkerChoiceStrategyOptions
) {
- this.setOptions(this.opts)
this.choose = this.choose.bind(this)
+ this.setOptions(this.opts)
}
protected setTaskStatisticsRequirements (