pub(crate) fn clear(&mut self) {
    let mut state = self.state.lock();

    let (run_token, generation, previous_result) =
      match mem::replace(&mut *state, EntryState::initial()) {
        EntryState::NotStarted {
          run_token,
          generation,
          previous_result,
          ..
        } => (run_token, generation, previous_result),
        EntryState::Running {
          run_token,
          abort_handle,
          generation,
          previous_result,
          ..
        } => {
          abort_handle.abort();
          (run_token, generation, previous_result)
        }
        EntryState::Completed {
          run_token,
          generation,
          result,
          ..
        } => (run_token, generation, Some(result)),
      };

    trace!("Clearing node {:?}", self.node);

    // Swap in a state with a new RunToken value, which invalidates any outstanding work and all
    // edges for the previous run.
    *state = EntryState::NotStarted {
      run_token: run_token.next(),
      generation,
      previous_result,
    };
  }
///
/// Clears the state of this Node, forcing it to be recomputed.
///
Clears the state of this Node, forcing it to be recomputed.
Clears the state of this Node forcing it to be recomputed .
pub(crate) fn clear(&mut self) {
    let mut state = self.state.lock();
    let (run_token, generation, previous_result) =
      match mem::replace(&mut *state, EntryState::initial()) {
        EntryState::NotStarted {
          run_token,
          generation,
          previous_result,
          ..
        } => (run_token, generation, previous_result),
        EntryState::Running {
          run_token,
          abort_handle,
          generation,
          previous_result,
          ..
        } => {
          abort_handle.abort();
          (run_token, generation, previous_result)
        }
        EntryState::Completed {
          run_token,
          generation,
          result,
          ..
        } => (run_token, generation, Some(result)),
      };
    trace!("Clearing node {:?}", self.node);
    // Swap in a state with a new RunToken value, which invalidates any outstanding work and all
    // edges for the previous run.
    *state = EntryState::NotStarted {
      run_token: run_token.next(),
      generation,
      previous_result,
    };
  }
pub ( crate ) fn clear ( & mut self ) { let mut state = self . state . lock ( ) ; let ( run_token , generation , previous_result ) = match mem :: replace ( & mut * state , EntryState :: initial ( ) ) { EntryState :: NotStarted { run_token , generation , previous_result , .. } => ( run_token , generation , previous_result ) , EntryState :: Running { run_token , abort_handle , generation , previous_result , .. } => { abort_handle . abort ( ) ; ( run_token , generation , previous_result ) } EntryState :: Completed { run_token , generation , result , .. } => ( run_token , generation , Some ( result ) ) , } ; trace ! ( " " self node ) ; // Swap in a state with a new RunToken value, which invalidates any outstanding work and all // edges for the previous run. * state = EntryState :: NotStarted { run_token : run_token . next ( ) , generation , previous_result , } ; }
Clears the state of this Node, forcing it to be recomputed.
Clears the state of this Node forcing it to be recomputed .
&mut self
&mut self