summaryrefslogtreecommitdiffstats
path: root/tokio/tests/signal_notify_both.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/tests/signal_notify_both.rs')
-rw-r--r--tokio/tests/signal_notify_both.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/tokio/tests/signal_notify_both.rs b/tokio/tests/signal_notify_both.rs
index 00385478..7d830686 100644
--- a/tokio/tests/signal_notify_both.rs
+++ b/tokio/tests/signal_notify_both.rs
@@ -6,18 +6,17 @@ mod support {
}
use support::signal::send_signal;
-use tokio::prelude::*;
use tokio::signal::unix::{signal, SignalKind};
-use futures::future;
-
#[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");
+ let mut signal1 = signal(kind).expect("failed to create signal1");
+ let mut signal2 = signal(kind).expect("failed to create signal2");
send_signal(libc::SIGUSR2);
- let _ = future::join(signal1.into_future(), signal2.into_future()).await;
+
+ signal1.recv().await;
+ signal2.recv().await;
}