A tiny utility that coalesces/enqueues async operations so only the latest queued task runs per cycle, while callers receive a promise that resolves when the task for the cycle they joined has completed.
Optional
The currently running promise of #drainLoop. Do not await this, instead await pending to await the current cycle.
pending
Queue the next operation and return a promise that resolves when it flushes.
A tiny utility that coalesces/enqueues async operations so only the latest queued task runs per cycle, while callers receive a promise that resolves when the task for the cycle they joined has completed.