From: Jérôme Benoit Date: Thu, 17 Aug 2023 23:01:17 +0000 (+0200) Subject: docs: add missing code comments X-Git-Tag: v2.6.29~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2809112e53951451aeb76e86a2dcc263ba80e43c;p=poolifier.git docs: add missing code comments Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/pool.ts b/src/pools/pool.ts index 26ca4c03..6f3d9561 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -191,6 +191,7 @@ export interface IPool< * - '`destroy`': Emitted when the pool is destroyed. * - `'error'`: Emitted when an uncaught error occurs. * - `'taskError'`: Emitted when an error occurs while executing a task. + * - `'backPressure'`: Emitted when a worker node has back pressure (i.e. its tasks queue is full). */ readonly emitter?: PoolEmitter /** diff --git a/src/pools/worker.ts b/src/pools/worker.ts index cd395bbd..3c44f05e 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -257,7 +257,10 @@ export interface IWorkerNode { */ readonly closeChannel: () => void /** - * Gets task worker usage statistics. + * Gets task function worker usage statistics. + * + * @param name - The task function name. + * @returns The task function worker usage statistics if the task function worker usage statistics are initialized, `undefined` otherwise. */ readonly getTaskWorkerUsage: (name: string) => WorkerUsage | undefined }