refactor(simulator): cleanup worker set variable namespace
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 22 Jul 2023 12:40:52 +0000 (14:40 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 22 Jul 2023 12:40:52 +0000 (14:40 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/worker/WorkerSet.ts

index 42109a98567609739d70a4e00c3c10d6e7420d07..fd81840a7a35139e238ff203facef400576e6572 100644 (file)
@@ -78,13 +78,13 @@ export class WorkerSet extends WorkerAbstract<WorkerData> {
   public async stop(): Promise<void> {
     for (const workerSetElement of this.workerSet) {
       const worker = workerSetElement.worker;
-      const workerExitPromise = new Promise<void>((resolve) => {
+      const waitWorkerExit = new Promise<void>((resolve) => {
         worker.on('exit', () => {
           resolve();
         });
       });
       await worker.terminate();
-      await workerExitPromise;
+      await waitWorkerExit;
     }
   }