Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
*/
protected chooseWorkerNode (): [number, WorkerNode<Worker, Data>] {
let workerNodeKey: number
- if (
- this.type === PoolType.DYNAMIC &&
- !this.full &&
- this.findFreeWorkerNodeKey() === -1
- ) {
+ if (this.type === PoolType.DYNAMIC && !this.full && this.internalBusy()) {
const workerCreated = this.createAndSetupWorker()
this.registerWorkerMessageListener(workerCreated, message => {
if (
/** @inheritDoc */
public get busy (): boolean {
- return this.full && this.findFreeWorkerNodeKey() === -1
+ return this.full && this.internalBusy()
}
}
/** @inheritDoc */
public get busy (): boolean {
- return this.full && this.findFreeWorkerNodeKey() === -1
+ return this.full && this.internalBusy()
}
}