fn spawn(
        receiver: SchedReceiver, monitor: MonitorSender, queues: (ExecutorInjector, SchedTaskInjector),
    ) -> Option<thread::JoinHandle<()>> {
        log::info!("Starting scheduler");
        let thread = std::thread::spawn(move || {
            let mut sched_thread = Self {
                receiver,
                monitor,
                run_queue: queues.0,
                wait_queue: queues.1,
                is_running: true,
                is_started: false,
                machines: MachineMap::with_capacity(get_machine_count_estimate()),
            };
            sched_thread.run();
        });
        Some(thread)
    }
// start the scheduler thread and call run()
start the scheduler thread and call run()
start the scheduler thread and call run ()
fn spawn(
        receiver: SchedReceiver, monitor: MonitorSender, queues: (ExecutorInjector, SchedTaskInjector),
    ) -> Option<thread::JoinHandle<()>> {
        log::info!("Starting scheduler");
        let thread = std::thread::spawn(move || {
            let mut sched_thread = Self {
                receiver,
                monitor,
                run_queue: queues.0,
                wait_queue: queues.1,
                is_running: true,
                is_started: false,
                machines: MachineMap::with_capacity(get_machine_count_estimate()),
            };
            sched_thread.run();
        });
        Some(thread)
    }
fn spawn ( receiver : SchedReceiver , monitor : MonitorSender , queues : ( ExecutorInjector , SchedTaskInjector ) , ) -> Option < thread :: JoinHandle < ( ) > > { log :: info ! ( " " ) ; let thread = std :: thread :: spawn ( move | | { let mut sched_thread = Self { receiver , monitor , run_queue : queues . 0 , wait_queue : queues . 1 , is_running : true , is_started : false , machines : MachineMap :: with_capacity ( get_machine_count_estimate ( ) ) , } ; sched_thread . run ( ) ; } ) ; Some ( thread ) }
start the scheduler thread and call run()
start the scheduler thread and call run ()
receiver
SchedReceiver
monitor
MonitorSender
queues
(ExecutorInjector, SchedTaskInjector)