pub fn run_parallel_chunks<J, T, F>(
jobs: &[J],
parallelism: usize,
stage_name: &'static str,
run_job: F,
) -> Result<Vec<T>>Expand description
Run run_job across jobs with bounded parallelism. Returns the
per-job results in submission order.
stage_name is embedded in the panic error message so a crash in one
stage is attributable at a glance ("nfpm worker thread panicked" vs
"snapcraft worker thread panicked").
parallelism is clamped to >= 1 internally, so callers can pass
ctx.options.parallelism without pre-clamping.