pub(crate) fn suspend(&self, key: TaskKey) -> bool {
        match self.registry.get(key) {
            Some(task) if task.get_stop_reason() == StopReason::None => {
                task.set_stop_reason(StopReason::Suspended);
                self.inc_suspended();
                true
            }
            _ => false,
        }
    }
//if rotate_once encounters suspended task, then it will be removed from queue
if rotate_once encounters suspended task, then it will be removed from queue
if rotate_once encounters suspended task then it will be removed from queue
pub(crate) fn suspend(&self, key: TaskKey) -> bool {
        match self.registry.get(key) {
            Some(task) if task.get_stop_reason() == StopReason::None => {
                task.set_stop_reason(StopReason::Suspended);
                self.inc_suspended();
                true
            }
            _ => false,
        }
    }
pub ( crate ) fn suspend ( & self , key : TaskKey ) -> bool { match self . registry . get ( key ) { Some ( task ) if task . get_stop_reason ( ) == StopReason :: None => { task . set_stop_reason ( StopReason :: Suspended ) ; self . inc_suspended ( ) ; true } _ => false , } }
if rotate_once encounters suspended task, then it will be removed from queue
if rotate_once encounters suspended task then it will be removed from queue
&self
key
TaskKey
&self
key
TaskKey