OptionalabortOptional bounded cooperative-abort window after graceful drain expires.
Runner 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 skip
this phase.
OptionalcooldownShort 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.
OptionaldrainingDrain 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 and abortWindowMs > 0, shutdown can
enter the cooperative-abort phase right away.
OptionaltotalTotal disposal budget (milliseconds) for the shutdown lifecycle.
This budget covers cooldown(), the post-cooldown window, disposing
hooks, drain wait, drained hooks, and resource disposal.
Once exhausted, Runner stops waiting and returns.
Shutdown timing controls for
run(..., { dispose }).