http/pending_effects.ts view source
(ctx: PendingEffectsContext, fn: () => void): void Defer a side effect until after the handler's transaction commits.
Exceptions thrown by fn are caught and logged via ctx.log.error, so one
failed send cannot corrupt the already-committed response or starve other
queued effects in the same tick.
ctx
context carrying log and the pending_effects queue
fn
synchronous side effect to run after commit
() => voidreturns
void