This commit is contained in:
arkpar 2016-01-22 14:03:42 +01:00
parent 74d34614cf
commit 9159d3fea0

View File

@ -36,10 +36,7 @@ fn main() {
let exit = Arc::new(Condvar::new()); let exit = Arc::new(Condvar::new());
let e = exit.clone(); let e = exit.clone();
CtrlC::set_handler(move || { CtrlC::set_handler(move || { e.notify_all(); });
e.notify_all();
});
let mutex = Mutex::new(()); let mutex = Mutex::new(());
let _ = exit.wait(mutex.lock().unwrap()).unwrap(); let _ = exit.wait(mutex.lock().unwrap()).unwrap();
} }