From: Jérôme Benoit Date: Wed, 1 May 2024 16:39:19 +0000 (+0200) Subject: docs: refine code comments X-Git-Tag: v4.0.1~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=181af286689e0b42fcac115ace6541364a943af2;p=poolifier.git docs: refine code comments Signed-off-by: Jérôme Benoit --- diff --git a/docs/api.md b/docs/api.md index db56dc43..dd9f833c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -115,7 +115,7 @@ An object with these properties: - `runTime` (optional) - Use the tasks [simple moving median](./worker-choice-strategies.md#simple-moving-median) runtime instead of the tasks simple moving average runtime in worker choice strategies. - `waitTime` (optional) - Use the tasks [simple moving median](./worker-choice-strategies.md#simple-moving-median) wait time instead of the tasks simple moving average wait time in worker choice strategies. - `elu` (optional) - Use the tasks [simple moving median](./worker-choice-strategies.md#simple-moving-median) ELU instead of the tasks simple moving average ELU in worker choice strategies. - - `weights` (optional) - The worker weights to use in weighted round robin worker choice strategies: `{ 0: 200, 1: 300, ..., n: 100 }`. + - `weights` (optional) - The worker weights to use in weighted round robin worker choice strategies: `Record`. Default: `{ runTime: { median: false }, waitTime: { median: false }, elu: { median: false } }` diff --git a/src/worker/task-functions.ts b/src/worker/task-functions.ts index 8999b69d..0b3083c3 100644 --- a/src/worker/task-functions.ts +++ b/src/worker/task-functions.ts @@ -62,7 +62,7 @@ export interface TaskFunctionObject { /** * Tasks functions that can be executed. * The key is the name of the task function or task function object. - * The value is the function or task function object. + * The value is the task function or task function object. * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data.