fix: fix pool sizing in examples
[poolifier.git] / src / utility-types.ts
index be0ed287633b24e211e46024f736aefc033701e3..d6869557d5af04ec06444e320d1fe6cac41cadc0 100644 (file)
@@ -1,5 +1,5 @@
 import type { EventLoopUtilization } from 'node:perf_hooks'
-import type { MessagePort } from 'node:worker_threads'
+import type { MessagePort, TransferListItem } from 'node:worker_threads'
 import type { KillBehavior } from './worker/worker-options'
 
 /**
@@ -75,14 +75,18 @@ export interface Task<Data = unknown> {
    * Task input data that will be passed to the worker.
    */
   readonly data?: Data
+  /**
+   * Array of transferable objects.
+   */
+  readonly transferList?: TransferListItem[]
   /**
    * Timestamp.
    */
   readonly timestamp?: number
   /**
-   * Message UUID.
+   * Task UUID.
    */
-  readonly id?: string
+  readonly taskId?: string
 }
 
 /**