Files
tokio/tokio-net/tests/signal_notify_both.rs
T

18 lines
446 B
Rust
Raw Normal View History

#![cfg(unix)]
2019-08-17 13:43:55 -07:00
#![cfg(feature = "signal")]
#![warn(rust_2018_idioms)]
mod support;
use support::*;
2019-07-03 10:40:59 -07:00
#[tokio::test]
async fn notify_both() {
2019-08-15 21:09:09 -07:00
let kind = SignalKind::user_defined2();
let signal1 = signal(kind).expect("failed to create signal1");
2018-07-28 12:30:46 -07:00
let signal2 = signal(kind).expect("failed to create signal2");
2018-07-28 12:30:46 -07:00
send_signal(libc::SIGUSR2);
let _ = with_timeout(future::join(signal1.into_future(), signal2.into_future())).await;
}