Files
tokio/tokio-signal/tests/notify_both.rs
T
Ivan Petkov cbad83f362 signal: migrate to std::futures (#1218)
Migrate to std::futures and the futures 0.3 preview and use async/await
where possible

**Breaking change:** the IoFuture and IoStream definitions used to refer
to Box<dyn Future> and Box<dyn Stream>, but now they are defined as
Pin<...> versions which are technically breaking.

No other breaking or functional changes have been made
2019-07-03 10:40:59 -07:00

23 lines
527 B
Rust

#![cfg(unix)]
#![deny(warnings, rust_2018_idioms)]
#![feature(async_await)]
pub mod support;
use crate::support::*;
use libc;
#[tokio::test]
async fn notify_both() {
let signal1 = with_timeout(Signal::new(libc::SIGUSR2))
.await
.expect("failed to create signal1");
let signal2 = with_timeout(Signal::new(libc::SIGUSR2))
.await
.expect("failed to create signal2");
send_signal(libc::SIGUSR2);
with_timeout(future::join(signal1.into_future(), signal2.into_future())).await;
}