pub struct ScatterGatherRunner { /* private fields */ }Expand description
Runs scatter/gather pipelines.
Uses a single dispatcher for sequential stages (pre_scatter, post_gather),
and forks it per parallel worker via CommandDispatcher::fork. Each
worker gets its own subkernel with snapshotted session state so they can
run concurrently without racing on scope/cwd/aliases.
Implementations§
Source§impl ScatterGatherRunner
impl ScatterGatherRunner
Sourcepub fn new(
tools: Arc<ToolRegistry>,
dispatcher: Arc<dyn CommandDispatcher>,
) -> Self
pub fn new( tools: Arc<ToolRegistry>, dispatcher: Arc<dyn CommandDispatcher>, ) -> Self
Create a new scatter/gather runner.
dispatcher drives sequential stages directly and serves as the fork
source for parallel workers.
Sourcepub async fn run(
&self,
pre_scatter: &[Command],
scatter_opts: ScatterOptions,
parallel: &[Command],
gather_opts: GatherOptions,
post_gather: &[Command],
ctx: &mut ExecContext,
) -> ExecResult
pub async fn run( &self, pre_scatter: &[Command], scatter_opts: ScatterOptions, parallel: &[Command], gather_opts: GatherOptions, post_gather: &[Command], ctx: &mut ExecContext, ) -> ExecResult
Execute a scatter/gather pipeline.
The pipeline is split into three parts:
- pre_scatter: commands before scatter
- parallel: commands between scatter and gather
- post_gather: commands after gather
Returns the final result after all stages complete.
Auto Trait Implementations§
impl !RefUnwindSafe for ScatterGatherRunner
impl !UnwindSafe for ScatterGatherRunner
impl Freeze for ScatterGatherRunner
impl Send for ScatterGatherRunner
impl Sync for ScatterGatherRunner
impl Unpin for ScatterGatherRunner
impl UnsafeUnpin for ScatterGatherRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more