import type { EventLoopUtilization } from 'node:perf_hooks'
import type { MessagePort } from 'node:worker_threads'
import type { KillBehavior } from './worker/worker-options'
-import type { IWorker } from './pools/worker'
/**
* Task error.
*/
readonly timestamp?: number
/**
- * Message UUID.
+ * Task UUID.
*/
- readonly id?: string
+ readonly taskId?: string
}
/**
}
/**
- * An object holding the execution response promise resolve/reject callbacks.
+ * An object holding the task execution response promise resolve/reject callbacks.
*
- * @typeParam Worker - Type of worker.
* @typeParam Response - Type of execution response. This can only be structured-cloneable data.
* @internal
*/
-export interface PromiseResponseWrapper<
- Worker extends IWorker,
- Response = unknown
-> {
+export interface PromiseResponseWrapper<Response = unknown> {
/**
* Resolve callback to fulfill the promise.
*/
*/
readonly reject: (reason?: unknown) => void
/**
- * The worker handling the execution.
+ * The worker node key executing the task.
*/
- readonly worker: Worker
+ readonly workerNodeKey: number
}