Expand description
A single-worker driver for the protocol.
A Run drives any number of root planners, each with its own IO session, and hands their
batches to its caller as they are produced. Runnable items are prioritised in DFS preorder,
with roots ordered by admission and children by emission. Each visit takes at most one CPU
step. A parent’s continuation follows its emitted child’s entire subtree. Waiting work is
skipped and regains its priority when IO makes it runnable. Published IO is registered
immediately and state is inspected again before parking. Output follows emission order,
not global row order. An earlier runnable branch can starve later branches.
A run never blocks: Run::advance returns Progress::Waiting when every live item waits
for IO, and the caller decides how to wait, by awaiting Run::poll_completion or by handing
a completion it took from a source to Run::complete. Driver::run is the blocking
convenience for one root.
Structs§
- Batch
- One array produced by a morsel, with the scope the morsel was created for.
- Driver
- Drives one root to completion on the calling thread, blocking while it waits for IO.
- RootId
- Identifies one root admitted to a
Run. Unique within the run, in admission order. - Run
- A set of root planners advanced by its caller on one thread at a time.
Enums§
- Progress
- What a call to
Run::advanceleft behind.