Noelle 4年前
コミット
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<()>,

読み込み中…
キャンセル
保存