Core pattern
- Python
- TypeScript
Execution order example
In this pattern, sibling work can already be queued, but the awaited child still runs first.- Python
- TypeScript
Interaction with concurrency modes
event_concurrency = global-serial: queue-jump still works, but all buses still share one global event slot.event_concurrency = bus-serial: queue-jump preempts that bus queue; other buses can continue processing independently.event_concurrency = parallel: events may already overlap; queue-jump still reduces parent latency for awaited child calls.event_handler_concurrency = serial: parent temporarily yields execution so child handlers can run without deadlock.event_handler_concurrency = parallel: child handlers can overlap with other handlers for the same event.event_handler_completion = first: winner semantics can cancel loser handlers and their in-flight child work.
Notes
- In Python,
await child_eventinside a handler is the immediate path. - In TypeScript, use
await child_event.done()orawait child_event.immediate(). - In TypeScript,
await child_event.waitForCompletion()keeps normal queue order (non-queue-jump wait).