test: add kill behavior testing
[poolifier.git] / src / pools / abstract-pool.ts
index 55c380b80c5b92de72bb1c4c87e57f4614c56f37..631434f37618e4727b2a8dcdbee119c309965da1 100644 (file)
@@ -410,6 +410,7 @@ export abstract class AbstractPool<
     await Promise.all(
       this.workerNodes.map(async (workerNode, workerNodeKey) => {
         this.flushTasksQueue(workerNodeKey)
+        // FIXME: wait for tasks to be finished
         await this.destroyWorker(workerNode.worker)
       })
     )
@@ -535,6 +536,7 @@ export abstract class AbstractPool<
         ) {
           // Kill message received from the worker: no new tasks are submitted to that worker for a while ( > maxInactiveTime)
           this.flushTasksQueue(currentWorkerNodeKey)
+          // FIXME: wait for tasks to be finished
           void (this.destroyWorker(workerCreated) as Promise<void>)
         }
       })