/// Remove the task from outputs, inputs, from governors if scheduled, and the owner.
/// Clears (and fails) any finish_hooks. Leaves the unlinked Task in in consistent state.
Remove the task from outputs, inputs, from governors if scheduled, and the owner.
Clears (and fails) any finish_hooks. Leaves the unlinked Task in in consistent state.
Remove the task from outputs inputs from governors if scheduled and the owner . Clears ( and fails ) any finish_hooks . Leaves the unlinked Task in in consistent state .
pub fn unlink(&self) {
        self.unschedule();
        let mut inner = self.get_mut();
        assert!(
            inner.assigned.is_none(),
            "Can only unlink non-assigned tasks."
        );
        // remove from outputs
        for o in inner.outputs.iter() {
            debug_assert!(o.get_mut().producer == Some(self.clone()));
            o.get_mut().producer = None;
        }
        // remove from inputs
        for i in inner.inputs.iter() {
            // Note that self may have been removed by another input
            i.object.get_mut().consumers.remove(&self);
        }
        // remove from owner
        assert!(inner.session.get_mut().tasks.remove(&self));
        // clear and fail finish_hooks
        inner.finish_hooks.clear();
    }
pub fn unlink ( & self ) { self . unschedule ( ) ; let mut inner = self . get_mut ( ) ; assert ! ( inner assigned is_none ( ) " " ) ; // remove from outputs for o in inner . outputs . iter ( ) { debug_assert ! ( o get_mut ( ) producer Some ( self clone ( ) ) ) ; o . get_mut ( ) . producer = None ; } // remove from inputs for i in inner . inputs . iter ( ) { // Note that self may have been removed by another input i . object . get_mut ( ) . consumers . remove ( & self ) ; } // remove from owner assert ! ( inner session get_mut ( ) tasks remove ( self ) ) ; // clear and fail finish_hooks inner . finish_hooks . clear ( ) ; }
Remove the task from outputs, inputs, from governors if scheduled, and the owner.
Remove the task from outputs inputs from governors if scheduled and the owner .
&self