Merge branch 'master' into feature/task-functions
[poolifier.git] / src / pools / worker.ts
index 5cd58b28be9b2ee3ef44be54af4e2fb6bdcddca2..37d6308507669dd1f0ebcc295b790a1857c16a3e 100644 (file)
@@ -144,7 +144,7 @@ export interface WorkerInfo {
   /**
    * Task function names.
    */
-  taskFunctions?: string[]
+  taskFunctionNames?: string[]
 }
 
 /**
@@ -171,6 +171,15 @@ export interface WorkerUsage {
   readonly elu: EventLoopUtilizationMeasurementStatistics
 }
 
+/**
+ * Worker choice strategy data.
+ *
+ * @internal
+ */
+export interface StrategyData {
+  virtualTaskEndTimestamp?: number
+}
+
 /**
  * Worker interface.
  */
@@ -227,6 +236,11 @@ export interface IWorkerNode<Worker extends IWorker, Data = unknown> {
    * Worker usage statistics.
    */
   readonly usage: WorkerUsage
+  /**
+   * Worker choice strategy data.
+   * This is used to store data that is specific to the worker choice strategy.
+   */
+  strategyData?: StrategyData
   /**
    * Message channel (worker_threads only).
    */