fix: ensure worker removal impact is propated to worker choice strategy
[poolifier.git] / src / pools / selection-strategies / selection-strategies-types.ts
index a05fd9b784c9da682cd0e270f09b81ce41325d70..c098768533fcced20246044d5411ad1ebb7bb76c 100644 (file)
@@ -56,4 +56,10 @@ export interface IWorkerChoiceStrategy {
    * Chooses a worker in the pool and returns its key.
    */
   choose: () => number
+  /**
+   * Removes a worker reference from strategy internals.
+   *
+   * @param workerKey - The worker key.
+   */
+  remove: (workerKey: number) => boolean
 }