pub(crate) fn resume(&self, key: TaskKey) -> bool {
        match self.registry.get(key) {
            Some(task) if task.get_stop_reason() == StopReason::Suspended => {
                task.set_stop_reason(StopReason::None);
                self.dec_suspended();
                true
            }
            _ => false,
        }
    }
//safe to call from inside task
safe to call from inside task
safe to call from inside task
pub(crate) fn resume(&self, key: TaskKey) -> bool {
        match self.registry.get(key) {
            Some(task) if task.get_stop_reason() == StopReason::Suspended => {
                task.set_stop_reason(StopReason::None);
                self.dec_suspended();
                true
            }
            _ => false,
        }
    }
pub ( crate ) fn resume ( & self , key : TaskKey ) -> bool { match self . registry . get ( key ) { Some ( task ) if task . get_stop_reason ( ) == StopReason :: Suspended => { task . set_stop_reason ( StopReason :: None ) ; self . dec_suspended ( ) ; true } _ => false , } }
safe to call from inside task
safe to call from inside task
&self
key
TaskKey
&self
key
TaskKey