refactor: cleanup variables namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 22 Jul 2023 02:34:33 +0000 (04:34 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 22 Jul 2023 02:34:33 +0000 (04:34 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/cluster/fixed.ts
src/pools/thread/fixed.ts

index 8e264359b2ceed7a5efeab91d1488112b4f1dcb7..522e7b672abb09feb5700f7a854a00234889b103 100644 (file)
@@ -64,7 +64,7 @@ export class FixedClusterPool<
     this.flushTasksQueue(workerNodeKey)
     // FIXME: wait for tasks to be finished
     const worker = this.workerNodes[workerNodeKey].worker
-    const workerExitPromise = new Promise<void>(resolve => {
+    const waitWorkerExit = new Promise<void>(resolve => {
       worker.on('exit', () => {
         resolve()
       })
@@ -74,7 +74,7 @@ export class FixedClusterPool<
     })
     this.sendToWorker(workerNodeKey, { kill: true, workerId: worker.id })
     worker.disconnect()
-    await workerExitPromise
+    await waitWorkerExit
   }
 
   /** @inheritDoc */
index a575d0972ff6611fadcbb662e195f31bf118a6d7..7199baf8fdf5ad52bc43bcfdfe107de84719589a 100644 (file)
@@ -61,7 +61,7 @@ export class FixedThreadPool<
     // FIXME: wait for tasks to be finished
     const workerNode = this.workerNodes[workerNodeKey]
     const worker = workerNode.worker
-    const workerExitPromise = new Promise<void>(resolve => {
+    const waitWorkerExit = new Promise<void>(resolve => {
       worker.on('exit', () => {
         resolve()
       })
@@ -69,7 +69,7 @@ export class FixedThreadPool<
     this.sendToWorker(workerNodeKey, { kill: true, workerId: worker.threadId })
     workerNode.closeChannel()
     await worker.terminate()
-    await workerExitPromise
+    await waitWorkerExit
   }
 
   /** @inheritDoc */