mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
signal: Replace ctrl_c with a CtrlC struct (#1273)
* Add a new `CtrlC` struct which will represent a stream of SIGINT signals on Unix or the CTRL_C event on Windows * `CtrlC` implements `Stream<Output = ()>` rather than `IoSteam` as previously
This commit is contained in:
@@ -22,7 +22,7 @@ fn multi_loop() {
|
||||
let mut rt = CurrentThreadRuntime::new().unwrap();
|
||||
let signal = run_with_timeout(&mut rt, Signal::new(libc::SIGHUP)).unwrap();
|
||||
sender.send(()).unwrap();
|
||||
run_with_timeout(&mut rt, signal.into_future());
|
||||
let _ = run_with_timeout(&mut rt, signal.into_future());
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
|
||||
Reference in New Issue
Block a user