pub fn stop(&self) -> Result<(), SchedulerError> {
        let mut schedules_map = self.scheduler_map.lock().unwrap();
        for (name, handle) in schedules_map.drain().take(1) {
            info!("Stopping {}'s tasks", name);
            if let Err(_) = handle.stopper.send(()) {
                error!("Failed to send stop to {}'s tasks", name);
            }
        }
        Ok(())
    }
// Stops all running tasks and clears of list of scheduler handles
Stops all running tasks and clears of list of scheduler handles
Stops all running tasks and clears of list of scheduler handles
pub fn stop(&self) -> Result<(), SchedulerError> {
        let mut schedules_map = self.scheduler_map.lock().unwrap();
        for (name, handle) in schedules_map.drain().take(1) {
            info!("Stopping {}'s tasks", name);
            if let Err(_) = handle.stopper.send(()) {
                error!("Failed to send stop to {}'s tasks", name);
            }
        }
        Ok(())
    }
pub fn stop ( & self ) -> Result < ( ) , SchedulerError > { let mut schedules_map = self . scheduler_map . lock ( ) . unwrap ( ) ; for ( name , handle ) in schedules_map . drain ( ) . take ( 1 ) { info ! ( " " name ) ; if let Err ( _ ) = handle . stopper . send ( ( ) ) { error ! ( " " name ) ; } } Ok ( ( ) ) }
Stops all running tasks and clears of list of scheduler handles
Stops all running tasks and clears of list of scheduler handles
&self
&self