fn submit_task<T: Data, U: Data, F>(
        &self,
        task: TaskOption,
        id_in_job: usize,
        thread_pool: Rc<ThreadPool>,
    ) where
        F: SerFunc((TasKContext, Box<dyn Iterator<Item = T>>)) -> U,
    {
        info!("inside submit task");
        let my_attempt_id = self.attempt_id.fetch_add(1, Ordering::SeqCst);
        let event_queues = self.event_queues.clone();
        let task = bincode::serialize(&task).unwrap();
        thread_pool.execute(move || {
            LocalScheduler::run_task::<T, U, F>(event_queues, task, id_in_job, my_attempt_id)
        });
    }
/// Every single task in run in the local thread pool
Every single task in run in the local thread pool
Every single task in run in the local thread pool
fn submit_task<T: Data, U: Data, F>(
        &self,
        task: TaskOption,
        id_in_job: usize,
        thread_pool: Rc<ThreadPool>,
    ) where
        F: SerFunc((TasKContext, Box<dyn Iterator<Item = T>>)) -> U,
    {
        info!("inside submit task");
        let my_attempt_id = self.attempt_id.fetch_add(1, Ordering::SeqCst);
        let event_queues = self.event_queues.clone();
        let task = bincode::serialize(&task).unwrap();
        thread_pool.execute(move || {
            LocalScheduler::run_task::<T, U, F>(event_queues, task, id_in_job, my_attempt_id)
        });
    }
fn submit_task < T : Data , U : Data , F > ( & self , task : TaskOption , id_in_job : usize , thread_pool : Rc < ThreadPool > , ) where F : SerFunc ( ( TasKContext , Box < dyn Iterator < Item = T > > ) ) -> U , { info ! ( " " ) ; let my_attempt_id = self . attempt_id . fetch_add ( 1 , Ordering :: SeqCst ) ; let event_queues = self . event_queues . clone ( ) ; let task = bincode :: serialize ( & task ) . unwrap ( ) ; thread_pool . execute ( move | | { LocalScheduler :: run_task :: < T , U , F > ( event_queues , task , id_in_job , my_attempt_id ) } ) ; }
Every single task in run in the local thread pool
Every single task in run in the local thread pool
&self
task
TaskOption
id_in_job
usize
thread_pool
Rc<ThreadPool>