fn mark_complete(&mut self, job_idx: usize, res: Result<Outcome, E>) {
        self.jobs[job_idx].state = match res {
            Ok(outcome) => State::Success(outcome),
            Err(err) => State::Failed(err),
        };

        for dep_idx in &self.jobs[job_idx].dependents {
            let is_ready = self.jobs[*dep_idx]
                .dependencies
                .iter()
                .all(|i| self.jobs[*i].state.success());
            if is_ready {
                self.ready.push(*dep_idx);
            }
        }
    }
/// Marks a job as completed and updates the ready queue with any new jobs that
/// are now ready to execute as a result.
Marks a job as completed and updates the ready queue with any new jobs that
are now ready to execute as a result.
Marks a job as completed and updates the ready queue with any new jobs that are now ready to execute as a result .
fn mark_complete(&mut self, job_idx: usize, res: Result<Outcome, E>) {
        self.jobs[job_idx].state = match res {
            Ok(outcome) => State::Success(outcome),
            Err(err) => State::Failed(err),
        };
        for dep_idx in &self.jobs[job_idx].dependents {
            let is_ready = self.jobs[*dep_idx]
                .dependencies
                .iter()
                .all(|i| self.jobs[*i].state.success());
            if is_ready {
                self.ready.push(*dep_idx);
            }
        }
    }
fn mark_complete ( & mut self , job_idx : usize , res : Result < Outcome , E > ) { self . jobs [ job_idx ] . state = match res { Ok ( outcome ) => State :: Success ( outcome ) , Err ( err ) => State :: Failed ( err ) , } ; for dep_idx in & self . jobs [ job_idx ] . dependents { let is_ready = self . jobs [ * dep_idx ] . dependencies . iter ( ) . all ( | i | self . jobs [ * i ] . state . success ( ) ) ; if is_ready { self . ready . push ( * dep_idx ) ; } } }
Marks a job as completed and updates the ready queue with any new jobs that
are now ready to execute as a result.
Marks a job as completed and updates the ready queue with any new jobs that are now ready to execute as a result .
&mut self
job_idx
usize
res
Result<Outcome, E>