X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=3e7c3427e84f7bedb015e8f6d7ef54215377bd40;hb=ffcbbad84f63b8a77f2b1a08f82deef5430f646e;hp=f875c2906ee3a173ffab6790d93aece511b2a0ef;hpb=ea7a90d36354a4e1c833271571c6f3eb80428600;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index f875c290..3e7c3427 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -30,14 +30,14 @@ export type WorkerChoiceStrategy = keyof typeof WorkerChoiceStrategies /** * Pool tasks usage statistics requirements. */ -export type RequiredStatistics = { +export interface RequiredStatistics { runTime: boolean } /** * Worker choice strategy interface. * - * @template Worker Type of worker which manages the strategy. + * @typeParam Worker - Type of worker which manages the strategy. */ export interface IWorkerChoiceStrategy { /** @@ -49,11 +49,11 @@ export interface IWorkerChoiceStrategy { */ readonly requiredStatistics: RequiredStatistics /** - * Resets strategy internal statistics. + * Resets strategy internals (counters, statistics, etc.). */ - resetStatistics(): boolean + reset: () => boolean /** * Chooses a worker in the pool. */ - choose(): Worker + choose: () => Worker }