From 50cf00ef03bb2b26c5979715ae8177e3d0286a58 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Sun, 9 Jul 2023 13:37:41 +0200 Subject: [PATCH] refactor: @ronag suggestion Co-authored-by: Robert Nagy --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 22354c54..b62b6121 100644 --- a/src/index.ts +++ b/src/index.ts @@ -889,8 +889,8 @@ class ThreadPool { } if (totalQueueSize >= totalCapacity) { - this.publicInterface.emit('needsDrain'); this.needsDrain = true; + this.publicInterface.emit('needsDrain'); } }