/// Waits until all the tasks are completed consuming self.
/// If `resume_panic` argument is `true ` and any of the tasks panic
/// method resumes the panic on the current task. It is useful in test environment
/// when you want your application to be panicked if any of the spawned tasks panic.
Waits until all the tasks are completed consuming self.
If `resume_panic` argument is `true ` and any of the tasks panic
method resumes the panic on the current task. It is useful in test environment
when you want your application to be panicked if any of the spawned tasks panic.
Waits until all the tasks are completed consuming self . If ` resume_panic ` argument is ` true ` and any of the tasks panic method resumes the panic on the current task . It is useful in test environment when you want your application to be panicked if any of the spawned tasks panic .
pub async fn join(mut self, resume_panic: bool) {
        for (_, task_handle) in std::mem::take(&mut self.tasks) {
            match task_handle.await {
                Err(TaskError::Panicked(reason)) => {
                    if resume_panic {
                        std::panic::resume_unwind(reason);
                    }
                }
                _ => {}
            }
        }
    }
pub async fn join ( mut self , resume_panic : bool ) { for ( _ , task_handle ) in std :: mem :: take ( & mut self . tasks ) { match task_handle . await { Err ( TaskError :: Panicked ( reason ) ) => { if resume_panic { std :: panic :: resume_unwind ( reason ) ; } } _ => { } } } }
Waits until all the tasks are completed consuming self.
Waits until all the tasks are completed consuming self .
mut self
resume_panic
bool