Oi.Dispatch.Orchestrator (oi v0.9.0)

Copy Markdown

Orchestrates barrier-synchronized execution of plan stages.

Fans out tasks per stage via the configured executor, collects results, enforces barrier before next stage. Results are merged into the drafting.

When conf.checkpoint is set, it is invoked before each stage with a Config.checkpoint_event() and the current drafting. Returning :halt stops the dispatch; the memory accumulated so far is returned as a {:halted, drafting, stage_index} partial result.

When conf.cancel_token is set, it is checked before each stage (before the checkpoint). A cancelled token stops the dispatch with the current memory as a {:cancelled, drafting, stage_index} partial result — cooperative, not preemptive: in-flight steps of the current stage run to completion.

Summary

Functions

dispatch(plan, drafting, conf)