X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;h=91441ace5a58d8ca6756a21b679a3dd13b73df55;hb=71ebe93bc57165070056097e96efc45b15a580e6;hp=486668a2f80d49d80a70f00528a7c8b4ad33467a;hpb=bbeadd16bc03b9199221a7fb5732af46e7867ded;p=poolifier.git diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 486668a2..91441ace 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -1,5 +1,5 @@ import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils' -import type { IPoolInternal } from '../pool-internal' +import type { IPool } from '../pool' import type { IWorker } from '../worker' import { FairShareWorkerChoiceStrategy } from './fair-share-worker-choice-strategy' import { LessBusyWorkerChoiceStrategy } from './less-busy-worker-choice-strategy' @@ -19,7 +19,7 @@ import { WeightedRoundRobinWorkerChoiceStrategy } from './weighted-round-robin-w * * @typeParam Worker - Type of worker. * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of response of execution. This can only be serializable data. + * @typeParam Response - Type of execution response. This can only be serializable data. */ export class WorkerChoiceStrategyContext< Worker extends IWorker, @@ -39,7 +39,7 @@ export class WorkerChoiceStrategyContext< * @param opts - The worker choice strategy options. */ public constructor ( - pool: IPoolInternal, + pool: IPool, private workerChoiceStrategyType: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN, opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS ) {