From: Jérôme Benoit Date: Tue, 30 Apr 2024 18:47:04 +0000 (+0200) Subject: refactor: cleanup pool start timestamp handling X-Git-Tag: v4.0.0~1^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2008bccd0d4af400baa540a38c744bcceda88469;p=poolifier.git refactor: cleanup pool start timestamp handling Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index e18f1499..4f60dff0 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1088,9 +1088,9 @@ export abstract class AbstractPool< } this.starting = true this.startMinimumNumberOfWorkers() + this.startTimestamp = performance.now() this.starting = false this.started = true - this.startTimestamp = performance.now() } /** @inheritDoc */ @@ -1113,9 +1113,9 @@ export abstract class AbstractPool< this.emitter?.emit(PoolEvents.destroy, this.info) this.emitter?.emitDestroy() this.readyEventEmitted = false + delete this.startTimestamp this.destroying = false this.started = false - delete this.startTimestamp } private async sendKillMessageToWorker (workerNodeKey: number): Promise {