refactor: cleanup variables namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 20 Mar 2024 20:01:58 +0000 (21:01 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 20 Mar 2024 20:01:58 +0000 (21:01 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts

index ba2b10add0706b4c43d3a0010544ba06cc41276e..97414af78c769ab44c61433ed8276b2b04d2500c 100644 (file)
@@ -107,7 +107,7 @@ export class WorkerSet<D extends WorkerData, R extends WorkerData> extends Worke
       throw new Error('Cannot add a WorkerSet element: not started')
     }
     const workerSetElement = await this.getWorkerSetElement()
-    const waitForAddedWorkerElement = new Promise<R>((resolve, reject) => {
+    const waitAddedWorkerElement = new Promise<R>((resolve, reject) => {
       const messageHandler = (message: WorkerMessage<R>): void => {
         if (message.event === WorkerMessageEvents.addedWorkerElement) {
           ++workerSetElement.numberOfWorkerElements
@@ -125,7 +125,7 @@ export class WorkerSet<D extends WorkerData, R extends WorkerData> extends Worke
       event: WorkerMessageEvents.addWorkerElement,
       data: elementData
     })
-    const response = await waitForAddedWorkerElement
+    const response = await waitAddedWorkerElement
     // Add element sequentially to optimize memory at startup
     // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
     if (this.workerOptions.elementAddDelay! > 0) {