X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fless-busy-worker-choice-strategy.ts;h=87ef804d50881f157e2810a715c2db4627315f33;hb=a22cdf86c993800ec9ea8ae32ef0d8dbda07ec61;hp=87ee1ef88f16714d4271a5ba671686d122667f35;hpb=c6bd2650c2690bd84951a2278820adde1b05b41b;p=poolifier.git diff --git a/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts b/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts index 87ee1ef8..87ef804d 100644 --- a/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts @@ -14,26 +14,26 @@ import type { */ export class LessBusyWorkerChoiceStrategy< Worker extends IPoolWorker, - Data, - Response + Data = unknown, + Response = unknown > extends AbstractWorkerChoiceStrategy implements IWorkerChoiceStrategy { - /** {@inheritDoc} */ + /** @inheritDoc */ public readonly requiredStatistics: RequiredStatistics = { runTime: true, avgRunTime: false } - /** {@inheritDoc} */ + /** @inheritDoc */ public reset (): boolean { return true } - /** {@inheritDoc} */ + /** @inheritDoc */ public choose (): number { const freeWorkerKey = this.pool.findFreeWorkerKey() - if (!this.isDynamicPool && freeWorkerKey !== -1) { + if (freeWorkerKey !== -1) { return freeWorkerKey } let minRunTime = Infinity @@ -50,7 +50,7 @@ export class LessBusyWorkerChoiceStrategy< return lessBusyWorkerKey } - /** {@inheritDoc} */ + /** @inheritDoc */ public remove (workerKey: number): boolean { return true }