refactor: code cleanup
[poolifier.git] / src / pools / abstract-pool.ts
index 4720e8b4354fd5efa5245f8381a0bab023d0fbfb..8e32218dfd521567663a27b09db1b2747d74b582 100644 (file)
@@ -1702,8 +1702,8 @@ export abstract class AbstractPool<
     workerNode.info.ready = ready
     workerNode.info.taskFunctionNames = taskFunctionNames
     if (!this.readyEventEmitted && this.ready) {
-      this.readyEventEmitted = true
       this.emitter?.emit(PoolEvents.ready, this.info)
+      this.readyEventEmitted = true
     }
   }