Drain the async jobs and shut down the threads.
(&mut self)
| 289 | |
| 290 | /// Drain the async jobs and shut down the threads. |
| 291 | fn drain_threads(&mut self) { |
| 292 | if let Some(mut conc) = self.threads.take() { |
| 293 | conc.shutdown(); |
| 294 | while self.reported_tests < self.tests.len() { |
| 295 | match conc.get() { |
| 296 | Some(reply) => self.handle_reply(reply), |
| 297 | None => break, |
| 298 | } |
| 299 | } |
| 300 | let pass_times = conc.join(); |
| 301 | if self.report_times { |
| 302 | println!("{pass_times}"); |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | /// Print out a report of slow tests. |
| 308 | fn report_slow_tests(&self) { |