Skip to main content

Module parallel

Module parallel 

Source
Expand description

Parallel step scheduler — depth-based wave execution with threads.

Organizes steps into execution waves based on dependency depth (from D15’s DependencyGraph). Steps at the same depth have no mutual dependencies and can safely execute in parallel.

Execution model: Wave 0: all root steps (no dependencies) — execute in parallel Wave 1: steps that depend only on wave-0 steps — execute in parallel Wave N: steps at depth N — execute after waves 0..N-1 complete

Between waves, results synchronize back into the shared context so that the next wave can read them via ${StepName} interpolation.

Thread model: uses std::thread::scope for safe, borrow-friendly parallelism within each wave. No heap allocation for thread handles needed.

Structs§

Schedule
Execution schedule — ordered sequence of waves derived from dependency analysis.
Wave
A single execution wave — a group of steps that can run concurrently.
WaveStepResult
Result of a single step execution within a wave.

Functions§

build_schedule
Build an execution schedule from a dependency graph.
execute_wave
Execute a wave of steps in parallel using scoped threads.