Constructors
constructor
- new AsyncSemaphore(instances?: number): AsyncSemaphore
-
Parameters
-
Optional
instances: number
Properties
Private
destroyed
destroyed: boolean
Private
instances
instances: number
Private
waiting
waiting: Waiter[]
Methods
acquire
- acquire(instances?: number): Promise<void>
-
Parameters
-
Optional
instances: number
Returns Promise<void>
destroy
- destroy(): void
-
Returns void
release
- release(instances?: number): void
-
Parameters
-
Optional
instances: number
Returns void
Async semaphore To create critical sections of async functions