X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fworker-options.ts;h=30da0a64c4688679c3730a635fd9c76c5feaf5b2;hb=f9b4bbf801547d7e17bf43e2e586ac956e97e1b0;hp=290914f1693d71b78f6af2445dbd4d1347b6e363;hpb=38e795c12f0e9daeff7b025147f36f85f486366e;p=poolifier.git diff --git a/src/worker/worker-options.ts b/src/worker/worker-options.ts index 290914f1..30da0a64 100644 --- a/src/worker/worker-options.ts +++ b/src/worker/worker-options.ts @@ -7,7 +7,7 @@ export const KillBehaviors = Object.freeze({ */ SOFT: 'SOFT', /** - * If `lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. + * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. */ HARD: 'HARD' } as const) @@ -20,7 +20,7 @@ export type KillBehavior = keyof typeof KillBehaviors /** * Detects whether the given value is a kill behavior or not. * - * @typeParam KB - Which specific KillBehavior to test against. + * @typeParam KB - Which specific KillBehavior type to test against. * @param killBehavior - Which kind of kill behavior to detect. * @param value - Any value. * @returns `true` if `value` was strictly equals to `killBehavior`, otherwise `false`. @@ -59,7 +59,7 @@ export interface WorkerOptions { * `killBehavior` dictates if your async unit (worker/process) will be deleted in case that a task is active on it. * * - SOFT: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker **won't** be deleted. - * - HARD: If `lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. + * - HARD: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. * * This option only apply to the newly created workers. *