fix: fix pool busyness semantic with task queueing enabled
[poolifier.git] / src / pools / worker.ts
index b7cd7f6799b9fe5b3c5da9c35be9d417a700c1b7..2da91457aed58994f01714a162adffba69ab61fe 100644 (file)
@@ -106,8 +106,8 @@ export interface TaskStatistics {
  * Enumeration of worker types.
  */
 export const WorkerTypes = Object.freeze({
-  cluster: 'cluster',
-  thread: 'thread'
+  thread: 'thread',
+  cluster: 'cluster'
 } as const)
 
 /**
@@ -242,6 +242,10 @@ export interface IWorkerNode<Worker extends IWorker, Data = unknown> {
    * Resets usage statistics .
    */
   readonly resetUsage: () => void
+  /**
+   * Close communication channel.
+   */
+  readonly closeChannel: () => void
   /**
    * Gets task worker usage statistics.
    */