X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fabstract-worker-choice-strategy.ts;h=5172a181a507fad13940216c933646c616ddb3fa;hb=ae46e139246f3d30c073d78a06e817ca8bd02b36;hp=476c58bc8bcf45f69450adb196e8886abe6f3b88;hpb=b9907d18a228d06e9f2c2e342f8bb16bb4cd3d8e;p=poolifier.git diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 476c58bc..5172a181 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -13,8 +13,8 @@ import type { * Worker choice strategy abstract base class. * * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of execution response. This can only be serializable data. + * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ export abstract class AbstractWorkerChoiceStrategy< Worker extends IWorker, @@ -133,9 +133,8 @@ export abstract class AbstractWorkerChoiceStrategy< /** @inheritDoc */ public setOptions (opts: WorkerChoiceStrategyOptions): void { - opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS - this.setTaskStatisticsRequirements(opts) - this.opts = opts + this.opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS + this.setTaskStatisticsRequirements(this.opts) } // /**