signal: Change constructors to return a result instead of lazy future (#1340)

This commit is contained in:
Ivan Petkov
2019-07-30 18:23:26 -07:00
committed by GitHub
parent bf38631d6a
commit ff922bbe6d
18 changed files with 86 additions and 143 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ fn multi_loop() {
let sender = sender.clone();
thread::spawn(move || {
let mut rt = CurrentThreadRuntime::new().unwrap();
let signal = run_with_timeout(&mut rt, Signal::new(libc::SIGHUP)).unwrap();
let signal = Signal::new(libc::SIGHUP).unwrap();
sender.send(()).unwrap();
let _ = run_with_timeout(&mut rt, signal.into_future());
})