pub fn throw_task(&mut self) -> GenerateFuture {
        let mut threads = vec![];
        while let Some(mut worker) = self.threads.pop() {
            threads.push(thread::spawn(move || (worker.generate(), worker)))
        }
        // note: get worker info in advance because thread is empty
        GenerateFuture {
            threads: Some(threads),
            result: None,
        }
    }
/// throw worker to other threads and return future
throw worker to other threads and return future
throw worker to other threads and return future
pub fn throw_task(&mut self) -> GenerateFuture {
        let mut threads = vec![];
        while let Some(mut worker) = self.threads.pop() {
            threads.push(thread::spawn(move || (worker.generate(), worker)))
        }
        // note: get worker info in advance because thread is empty
        GenerateFuture {
            threads: Some(threads),
            result: None,
        }
    }
pub fn throw_task ( & mut self ) -> GenerateFuture { let mut threads = vec ! [ ] ; while let Some ( mut worker ) = self . threads . pop ( ) { threads . push ( thread :: spawn ( move | | ( worker . generate ( ) , worker ) ) ) } // note: get worker info in advance because thread is empty GenerateFuture { threads : Some ( threads ) , result : None , } }
throw worker to other threads and return future
throw worker to other threads and return future
&mut self
&mut self