@bluelibs/runner - v6.4.1
    Preparing search index...

    Type Alias DisposeOptions

    Shutdown timing controls for run(..., { dispose }).

    type DisposeOptions = {
        abortWindowMs?: number;
        cooldownWindowMs?: number;
        drainingBudgetMs?: number;
        totalBudgetMs?: number;
    }
    Index

    Properties

    abortWindowMs?: number

    Optional bounded cooperative-abort window after graceful drain expires. Runner emits events.aborting, aborts its tracked task-local signals, then waits up to this window for in-flight business work to settle. Effective wait is capped by remaining dispose.totalBudgetMs. When drainingBudgetMs is 0, this can still run immediately after the initial drain check. Set to 0 to abort immediately without any extra post-abort wait.

    cooldownWindowMs?: number

    Short bounded post-cooldown window before disposing begins. Runner keeps the broader coolingDown admission policy open during this window before switching to the stricter disposing allowlist. Set to 0 to skip this wait.

    drainingBudgetMs?: number

    Drain budget (milliseconds) used while waiting for in-flight business work (tasks + event listeners) after entering disposing. Effective wait is capped by remaining dispose.totalBudgetMs. Set to 0 to skip drain waiting. Runner still performs an immediate drain check, so when work remains in flight, shutdown can enter the cooperative-abort phase right away.

    totalBudgetMs?: number

    Total disposal budget (milliseconds) for the shutdown lifecycle. This budget covers the post-cooldown window, graceful drain wait, and the optional abort wait window. Lifecycle hooks (disposing, aborting, drained) and final resource disposal are still awaited once Runner has already entered those phases, and cooldown() itself is fully awaited before those bounded waits begin.