Semaphore.acquire method
Semaphore › acquire
Takes a permit, waiting until one is free.Signature:
acquire(abortSignal?: AbortSignal | undefined): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
| abortSignal? | AbortSignal | undefined | Cancels the wait. An aborted acquire takes no permit, so it must not be released. |
Returns: Promise<void> — A Promise that resolves once the permit is held, or rejects with the signal's reason.