Skip to main content

Home > flowp > Semaphore > acquire

Semaphore.acquire() method

Acquire a permit, resolve when resouce is available.

Signature:

acquire(timeout?: number): Promise<() => void>;

Parameters

ParameterTypeDescription
timeoutnumber

Returns:

Promise<() => void>

a function to release semaphore