Noelle преди 6 години
родител
ревизия
f439c1417d
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10
    0
      src/lib.rs

+ 10
- 0
src/lib.rs Целия файл



} }


impl Drop for ThreadPool {
fn drop(&mut self) {
for worker in &mut self.workers {
println!("Shutting down worker {}", worker.id);

worker.thread.join().unwrap();
}
}
}

struct Worker { struct Worker {
id: usize, id: usize,
thread: thread::JoinHandle<()>, thread: thread::JoinHandle<()>,

Loading…
Отказ
Запис