refactor(simulator): remove unused async lock class attribute
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 20 May 2023 20:11:27 +0000 (22:11 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 20 May 2023 20:11:27 +0000 (22:11 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/AsyncLock.ts

index 7f44bd257251f32cde860ce6a40d6eb82cf1a51c..229086fef1e8d2b45b9ae8f39ca77b867af0e2d5 100644 (file)
@@ -10,7 +10,7 @@ export class AsyncLock {
   private acquired: boolean;
   private readonly resolveQueue: ((value: void | PromiseLike<void>) => void)[];
 
-  private constructor(private readonly type: AsyncLockType) {
+  private constructor() {
     this.acquired = false;
     this.resolveQueue = [];
   }
@@ -41,7 +41,7 @@ export class AsyncLock {
 
   private static getAsyncLock(type: AsyncLockType): AsyncLock {
     if (!AsyncLock.asyncLocks.has(type)) {
-      AsyncLock.asyncLocks.set(type, new AsyncLock(type));
+      AsyncLock.asyncLocks.set(type, new AsyncLock());
     }
     return AsyncLock.asyncLocks.get(type);
   }