Skip to main content

Module parallel_steps

Module parallel_steps 

Source
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§

ParallelSteps
A named group of steps that execute concurrently.
StepResult
The outcome of executing a single WorkflowStep.
WorkflowStep
A single unit of work inside a WorkflowStage.

Enums§

ParallelStepError
Errors from parallel (or sequential) step execution.
StepType
The unit of work a WorkflowStep performs.
WorkflowStage
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.