Skip to main content

Home > flowp > Semaphore > schedule

Semaphore.schedule() method

Schedule a task to run when a permit is available and automatically release after run.

Signature:

schedule<T>(fn: () => T): Promise<Awaited<T>>;

Parameters

ParameterTypeDescription
fn() => T

Returns:

Promise<Awaited<T>>