Skip to main content

dual_run

Function dual_run 

Source
pub fn dual_run(
    sui: &mut Command,
    nix: &mut Command,
    timeout: Duration,
) -> (CapturedOutput, CapturedOutput)
Expand description

Run two commands sequentially under the same timeout each, returning (sui_output, nix_output).

Sequential (not parallel) on purpose: nix’s eval cache lock, sui’s store-write lock, and disk-IO contention all behave better when the engines don’t race for the same FS resources. Wall-clock loss is small relative to a 30 s timeout budget.

§Errors

Returns the first spawn error encountered; both invocations are still attempted independently — a sui spawn failure does not skip nix.