fn run(&mut self) {
        log::info!("System Monitor is running");
        loop {
            match self.receiver.recv() {
                Err(_e) => break,
                Ok(m) => match m {
                    MonitorMessage::Terminate => break,
                    MonitorMessage::Parked(id) => {
                        log::debug!("System Monitor: Executor {} is parked", id);
                        self.executor.parked_executor(id);
                    },
                    MonitorMessage::Terminated(id) => self.executor.joinable_executor(id),
                    MonitorMessage::AddSender(sender) => self.add_sender(sender),
                    MonitorMessage::RemoveSender(sender) => self.remove_sender(sender),
                    MonitorMessage::ExecutorStats(stats) => self.try_fwd(CoreStatsMessage::ExecutorStats(stats)),
                    MonitorMessage::SchedStats(stats) => self.try_fwd(CoreStatsMessage::SchedStats(stats)),
                    MonitorMessage::MachineInfo(machine) => self.log_machine_info(machine),
                    #[allow(unreachable_patterns)]
                    _ => log::info!("System Monitor recevied an unhandled message {:#?}", m),
                },
            }
        }
        log::info!("System Monitor is stopped");
    }
// the system monitor run loop. It doesn't do much.
the system monitor run loop. It doesn't do much.
the system monitor run loop . It doesn ' t do much .
fn run(&mut self) {
        log::info!("System Monitor is running");
        loop {
            match self.receiver.recv() {
                Err(_e) => break,
                Ok(m) => match m {
                    MonitorMessage::Terminate => break,
                    MonitorMessage::Parked(id) => {
                        log::debug!("System Monitor: Executor {} is parked", id);
                        self.executor.parked_executor(id);
                    },
                    MonitorMessage::Terminated(id) => self.executor.joinable_executor(id),
                    MonitorMessage::AddSender(sender) => self.add_sender(sender),
                    MonitorMessage::RemoveSender(sender) => self.remove_sender(sender),
                    MonitorMessage::ExecutorStats(stats) => self.try_fwd(CoreStatsMessage::ExecutorStats(stats)),
                    MonitorMessage::SchedStats(stats) => self.try_fwd(CoreStatsMessage::SchedStats(stats)),
                    MonitorMessage::MachineInfo(machine) => self.log_machine_info(machine),
                    #[allow(unreachable_patterns)]
                    _ => log::info!("System Monitor recevied an unhandled message {:#?}", m),
                },
            }
        }
        log::info!("System Monitor is stopped");
    }
fn run ( & mut self ) { log :: info ! ( " " ) ; loop { match self . receiver . recv ( ) { Err ( _e ) => break , Ok ( m ) => match m { MonitorMessage :: Terminate => break , MonitorMessage :: Parked ( id ) => { log :: debug ! ( " " id ) ; self . executor . parked_executor ( id ) ; } , MonitorMessage :: Terminated ( id ) => self . executor . joinable_executor ( id ) , MonitorMessage :: AddSender ( sender ) => self . add_sender ( sender ) , MonitorMessage :: RemoveSender ( sender ) => self . remove_sender ( sender ) , MonitorMessage :: ExecutorStats ( stats ) => self . try_fwd ( CoreStatsMessage :: ExecutorStats ( stats ) ) , MonitorMessage :: SchedStats ( stats ) => self . try_fwd ( CoreStatsMessage :: SchedStats ( stats ) ) , MonitorMessage :: MachineInfo ( machine ) => self . log_machine_info ( machine ) , # [ allow ( unreachable_patterns ) ] _ => log :: info ! ( " " m ) , } , } } log :: info ! ( " " ) ; }
the system monitor run loop.
the system monitor run loop .
&mut self