mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
18 lines
446 B
Rust
18 lines
446 B
Rust
#![cfg(unix)]
|
|
#![cfg(feature = "signal")]
|
|
#![warn(rust_2018_idioms)]
|
|
|
|
mod support;
|
|
use support::*;
|
|
|
|
#[tokio::test]
|
|
async fn notify_both() {
|
|
let kind = SignalKind::user_defined2();
|
|
let signal1 = signal(kind).expect("failed to create signal1");
|
|
|
|
let signal2 = signal(kind).expect("failed to create signal2");
|
|
|
|
send_signal(libc::SIGUSR2);
|
|
let _ = with_timeout(future::join(signal1.into_future(), signal2.into_future())).await;
|
|
}
|