Skip to main content
first short-circuits event completion once the first successful non-None / non-undefined result is available.

Lifecycle impact

  1. The first successful result wins (None/undefined and errors do not win).
  2. In serial handler mode, remaining handlers are skipped once a winner appears.
  3. In parallel handler mode, in-flight losers are cancelled or aborted.
  4. Event completion resolves as soon as a winner is found (or all handlers fail).

Execution order example

Notes

  • This mode is useful for fallback chains and race-to-first-response patterns.
  • Use await event.now(first_result=True) / await event.now({ first_result: true }) / event.Now(&abxbus.EventWaitOptions{FirstResult: true}) / event.now_with_options(EventWaitOptions { first_result: true, ..Default::default() }) when you want to resolve as soon as a valid result is available while still allowing all handlers to continue. To stop running after the first valid handler result, set event_handler_completion: 'first' on the event definition.