From: Jérôme Benoit Date: Sat, 20 May 2023 20:11:27 +0000 (+0200) Subject: refactor(simulator): remove unused async lock class attribute X-Git-Tag: v1.2.14~36 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=42486f2357b011f9244c6b29f4e05185138ce8d1;p=e-mobility-charging-stations-simulator.git refactor(simulator): remove unused async lock class attribute Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/AsyncLock.ts b/src/utils/AsyncLock.ts index 7f44bd25..229086fe 100644 --- a/src/utils/AsyncLock.ts +++ b/src/utils/AsyncLock.ts @@ -10,7 +10,7 @@ export class AsyncLock { private acquired: boolean; private readonly resolveQueue: ((value: void | PromiseLike) => 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); }