mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
19 lines
459 B
Rust
19 lines
459 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 = Signal::new(libc::SIGUSR2).expect("failed to create signal1");
|
|
|
|
let signal2 = Signal::new(libc::SIGUSR2).expect("failed to create signal2");
|
|
|
|
send_signal(libc::SIGUSR2);
|
|
let _ = with_timeout(future::join(signal1.into_future(), signal2.into_future())).await;
|
|
}
|