From 2809112e53951451aeb76e86a2dcc263ba80e43c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Aug 2023 01:01:17 +0200 Subject: [PATCH] docs: add missing code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/pool.ts | 1 + src/pools/worker.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 } -- 2.34.1