From 52021de72b77aa6c6fdd7c6dd816d7d53e6b2feb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 30 Aug 2024 12:18:16 +0200 Subject: [PATCH] fix: fix dynamic thread pool full event emission rate MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/thread/dynamic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.34.1