X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fpool.ts;h=752045829214f76681f92d36fce414c581fd0c95;hb=897beca72d8ea0b909f5c9cd6deb8c5e58b1dd7f;hp=f48d8843d9596f914f60ae1349ff258af7df4518;hpb=deb85c12b77faf6974551cefcd9676e62a392086;p=poolifier.git diff --git a/src/pools/pool.ts b/src/pools/pool.ts index f48d8843..75204582 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -1,3 +1,5 @@ +import type { WorkerChoiceStrategy } from './selection-strategies' + /** * Contract definition for a poolifier pool. * @@ -16,4 +18,10 @@ export interface IPool { * Shut down every current worker in this pool. */ destroy(): Promise + /** + * Set the worker choice strategy in this pool. + * + * @param workerChoiceStrategy The worker choice strategy. + */ + setWorkerChoiceStrategy(workerChoiceStrategy: WorkerChoiceStrategy): void }