| Version | Supported |
| ------- | ------------------ |
-| 3.x.x | :white_check_mark: |
+| 4.x.x | :white_check_mark: |
+| 3.x.x | :x: |
| 2.x.x | :x: |
| 1.x.x | :x: |
MessageValue,
PromiseResponseWrapper,
Task,
+ TaskFunctionProperties,
TaskPerformance,
WorkerError,
WorkerStatistics,
export type {
TaskAsyncFunction,
TaskFunction,
+ TaskFunctionObject,
TaskFunctionOperationResult,
TaskFunctions,
TaskSyncFunction
}
/**
- * Chooses a worker node for the next task.
+ * Chooses a worker node for the next task given the worker choice strategy.
*
* @param workerChoiceStrategy - The worker choice strategy.
* @returns The chosen worker node key
/**
* Constructs a priority queue.
*
- * @param k - Prioritized bucket size.
+ * @param k - Prioritized bucket size. @defaultValue Infinity
*/
public constructor (k = Infinity) {
if (k !== Infinity && !Number.isSafeInteger(k)) {
/**
* Returns an iterator for the priority queue.
*
- * @returns An iterator for the deque.
+ * @returns An iterator for the priority queue.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
*/
[Symbol.iterator] (): Iterator<T> {
/**
* Task function properties.
- *
- * @internal
*/
export interface TaskFunctionProperties {
/**
* Task function name.
*/
- name: string
+ readonly name: string
/**
* Task function priority. Lower values have higher priority.
*/
- priority?: number
+ readonly priority?: number
/**
* Task function worker choice strategy.
*/
- strategy?: WorkerChoiceStrategy
+ readonly strategy?: WorkerChoiceStrategy
}
/**