import type { EventLoopUtilization } from 'node:perf_hooks'
import type { MessagePort, TransferListItem } from 'node:worker_threads'
+import type { WorkerChoiceStrategy } from './pools/selection-strategies/selection-strategies-types.js'
import type { KillBehavior } from './worker/worker-options.js'
/**
readonly elu: boolean
}
+/**
+ * Task function properties.
+ *
+ * @internal
+ */
+export interface TaskFunctionProperties {
+ /**
+ * Task function name.
+ */
+ name: string
+ /**
+ * Task function priority. Lower values have higher priority.
+ */
+ priority?: number
+ /**
+ * Task function worker choice strategy.
+ */
+ strategy?: WorkerChoiceStrategy
+}
+
/**
* Message object that is passed as a task between main worker and worker.
*
*/
readonly taskFunctionOperationStatus?: boolean
/**
- * Task function serialized to string.
+ * Task function properties.
*/
- readonly taskFunction?: string
+ readonly taskFunctionProperties?: TaskFunctionProperties
/**
- * Task function name.
+ * Task function serialized to string.
*/
- readonly taskFunctionName?: string
+ readonly taskFunction?: string
/**
- * Task function names.
+ * Task functions properties.
*/
- readonly taskFunctionNames?: string[]
+ readonly taskFunctionsProperties?: TaskFunctionProperties[]
/**
* Whether the worker computes the given statistics or not.
*/