From 8accb8d5d2f8a6d77017a421938796623ac2b239 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 15 Oct 2022 07:25:16 +0200 Subject: [PATCH] Refine some 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-internal.ts | 8 ++++---- src/worker/abstract-worker.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pools/pool-internal.ts b/src/pools/pool-internal.ts index 6e2850a8..3f35ec13 100644 --- a/src/pools/pool-internal.ts +++ b/src/pools/pool-internal.ts @@ -84,7 +84,7 @@ export interface IPoolInternal< readonly numberOfRunningTasks: number /** - * Find a free worker based on the number of tasks the worker has applied. + * Finds a free worker based on the number of tasks the worker has applied. * * If a worker is found with `0` running tasks, it is detected as free and returned. * @@ -95,7 +95,7 @@ export interface IPoolInternal< findFreeWorker(): Worker | false /** - * Get worker index. + * Gets worker index. * * @param worker The worker. * @returns The worker index. @@ -103,7 +103,7 @@ export interface IPoolInternal< getWorkerIndex(worker: Worker): number /** - * Get worker running tasks. + * Gets worker running tasks. * * @param worker The worker. * @returns The number of tasks currently running on the worker. @@ -111,7 +111,7 @@ export interface IPoolInternal< getWorkerRunningTasks(worker: Worker): number | undefined /** - * Get worker average tasks runtime. + * Gets worker average tasks runtime. * * @param worker The worker. * @returns The average tasks runtime on the worker. diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 52143fe3..9ec38fed 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -111,7 +111,7 @@ export abstract class AbstractWorker< } /** - * Check if the `fn` parameter is passed to the constructor. + * Checks if the `fn` parameter is passed to the constructor. * * @param fn The function that should be defined. */ @@ -132,7 +132,7 @@ export abstract class AbstractWorker< } /** - * Send a message to the main worker. + * Sends a message to the main worker. * * @param message The response message. */ @@ -151,7 +151,7 @@ export abstract class AbstractWorker< } /** - * Handle an error and convert it to a string so it can be sent back to the main worker. + * Handles an error and convert it to a string so it can be sent back to the main worker. * * @param e The error raised by the worker. * @returns Message of the error. @@ -161,7 +161,7 @@ export abstract class AbstractWorker< } /** - * Run the given function synchronously. + * Runs the given function synchronously. * * @param fn Function that will be executed. * @param value Input data for the given function. @@ -184,7 +184,7 @@ export abstract class AbstractWorker< } /** - * Run the given function asynchronously. + * Runs the given function asynchronously. * * @param fn Function that will be executed. * @param value Input data for the given function. -- 2.34.1