mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
signal: remove new() constructors in favor of free functions (#1472)
* Also removed any `*_with_handle` related methods in favor of always using the default reactor
This commit is contained in:
@@ -20,7 +20,7 @@ fn multi_loop() {
|
||||
let sender = sender.clone();
|
||||
thread::spawn(move || {
|
||||
let mut rt = CurrentThreadRuntime::new().unwrap();
|
||||
let signal = Signal::new(SignalKind::hangup()).unwrap();
|
||||
let signal = signal(SignalKind::hangup()).unwrap();
|
||||
sender.send(()).unwrap();
|
||||
let _ = run_with_timeout(&mut rt, signal.into_future());
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user