feat: internal messaging strict worker id checking
[poolifier.git] / src / pools / thread / fixed.ts
index 29f008806663aea87b837cbf412a5ed561d1974e..c9145f571186a9d5783531236414aff7eadd463e 100644 (file)
@@ -55,7 +55,7 @@ export class FixedThreadPool<
 
   /** @inheritDoc */
   protected async destroyWorker (worker: Worker): Promise<void> {
-    this.sendToWorker(worker, { kill: true })
+    this.sendToWorker(worker, { kill: true, workerId: worker.threadId })
     await worker.terminate()
   }