Constructors
constructor
- new Lock(pMaxConcurrentTasks?: number): Lock
-
Parameters
-
pMaxConcurrentTasks: number = 1
Accessors
isLocked
- get isLocked(): boolean
-
Returns boolean
Methods
waitWhileLocked
- waitWhileLocked(): Promise<void>
-
Returns Promise<void>
Can be use to synchronize an asynchronous operation to prevent parallel execution.