Improvements based on https://github.com/pioardi/poolifier/issues/6
[poolifier.git] / lib / fixed.js
index 8d899d57bb4ed00a54e4d1a1f2093641d8bd3f77..676947725bed0bb65fe72fe949be8652b08f39c5 100644 (file)
@@ -34,9 +34,9 @@ class FixedThreadPool {
     }
   }
 
-  destroy () {
+  async destroy () {
     for (const worker of this.workers) {
-      worker.terminate()
+      await worker.terminate()
     }
   }