X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fabstract-pool.ts;h=b299bc0172e839fdc57e165bd8e1391200a17885;hb=2092c35fc1873fb746244f15af3478e246bb4b3b;hp=4c78c28f1479f7988e10a9096710e1ec2e94c7cb;hpb=7254e41972596ec68a8790747b9fd4ef0def5afc;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 4c78c28f..b299bc01 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -296,14 +296,11 @@ export abstract class AbstractPool< protected abstract get busy (): boolean protected internalBusy (): boolean { - return this.findFreeWorkerNodeKey() === -1 - } - - /** @inheritDoc */ - public findFreeWorkerNodeKey (): number { - return this.workerNodes.findIndex(workerNode => { - return workerNode.tasksUsage?.running === 0 - }) + return ( + this.workerNodes.findIndex(workerNode => { + return workerNode.tasksUsage?.running === 0 + }) === -1 + ) } /** @inheritDoc */