Expand description
Parallel and sequential step execution within workflow stages.
A WorkflowStage is a logical grouping of WorkflowSteps that either
run in parallel (all steps spawned concurrently via std::thread::scope)
or sequentially (each step blocks the next).
§Example
use oximedia_workflow::parallel_steps::{
ParallelSteps, StepType, WorkflowStage, WorkflowStep,
};
let mut parallel = ParallelSteps::new("encode-all");
parallel.add_step(WorkflowStep::new("pass-1", StepType::Compute { value: 1 }));
parallel.add_step(WorkflowStep::new("pass-2", StepType::Compute { value: 2 }));
let results = parallel.execute_parallel().expect("all steps should succeed");
assert_eq!(results.len(), 2);Structs§
- Parallel
Steps - A named group of steps that execute concurrently.
- Step
Result - The outcome of executing a single
WorkflowStep. - Workflow
Step - A single unit of work inside a
WorkflowStage.
Enums§
- Parallel
Step Error - Errors from parallel (or sequential) step execution.
- Step
Type - The unit of work a
WorkflowStepperforms. - Workflow
Stage - A logical stage within a workflow, containing steps that run either sequentially or in parallel.
Functions§
- execute_
step - Execute a single step and return a
StepResult.