build(deps-dev): apply updates
[poolifier.git] / src / pools / pool.ts
index 856473ff354ee340ec9e990ec2f0de7d7d41e09b..08aad620f5cde2ef28892e43e47f99ba545e6707 100644 (file)
@@ -1,4 +1,4 @@
-import type { TransferListItem } from 'node:worker_threads'
+import type { TransferListItem, WorkerOptions } from 'node:worker_threads'
 import type { EventEmitterAsyncResource } from 'node:events'
 import type { ClusterSettings } from 'node:cluster'
 import type { TaskFunction } from '../worker/task-functions'
@@ -69,6 +69,8 @@ export interface PoolInfo {
   readonly utilization?: number
   /** Pool total worker nodes. */
   readonly workerNodes: number
+  /** Pool stealing worker nodes. */
+  readonly stealingWorkerNodes?: number
   /** Pool idle worker nodes. */
   readonly idleWorkerNodes: number
   /** Pool busy worker nodes. */
@@ -122,6 +124,12 @@ export interface TasksQueueOptions {
    * @defaultValue true
    */
   readonly tasksStealingOnBackPressure?: boolean
+  /**
+   * Queued tasks finished timeout in milliseconds at worker node termination.
+   *
+   * @defaultValue 2000
+   */
+  readonly tasksFinishedTimeout?: number
 }
 
 /**