letmutcomplete: Vec<job::Status<usize>>=vec_default!(jobs.len());// when we receive completion from the stream (which yeilds `(usize, usize)`), the first item is the *index* in this vector to set, and the second is the value
letstate: state::State={todo!()};
// - spawn the task thread pool
let(tx,recv_rx)=mpsc::channel();
// - move the output mapped file to the thread-safe refcounted `state::State`.
// - dispatch jobs to the pool with their fds, stats, and calculated output offsets; along with a reference to the output mapped file and a sender for the completion stream (`job::Prelude::start`)
forjobinjobs{
job_tx.send(job.start(state.clone()))?;
}
// - Read the completion stream receiver until all file jobs have been signaled as completed
// - truncate the output file to the correct size (sum of all the input sizes) if needed (we do not truncate before fallocate()ing it, so if a previous larger file existed there, it will have trailing garbage)