From: Jérôme Benoit Date: Fri, 30 Aug 2024 10:18:16 +0000 (+0200) Subject: fix: fix dynamic thread pool full event emission rate X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=52021de72b77aa6c6fdd7c6dd816d7d53e6b2feb;p=poolifier.git fix: fix dynamic thread pool full event emission rate Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index 34806edb..086f8733 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -44,7 +44,7 @@ export class DynamicThreadPool< /** @inheritDoc */ protected checkAndEmitDynamicWorkerCreationEvents (): void { - if (this.emitter != null && this.full) { + if (this.emitter != null && !this.fullEventEmitted && this.full) { this.emitter.emit(PoolEvents.full, this.info) this.fullEventEmitted = true }