1 #![warn(rust_2018_idioms)]
2 #![cfg(feature = "full")]
8 use support
::signal
::send_signal
;
10 use tokio
::runtime
::Runtime
;
11 use tokio
::signal
::unix
::{signal, SignalKind}
;
14 fn dropping_loops_does_not_cause_starvation() {
15 let kind
= SignalKind
::user_defined1();
18 let mut first_signal
=
19 first_rt
.block_on(async { signal(kind).expect("failed to register first signal") }
);
22 let mut second_signal
=
23 second_rt
.block_on(async { signal(kind).expect("failed to register second signal") }
);
25 send_signal(libc
::SIGUSR1
);
28 .block_on(first_signal
.recv())
29 .expect("failed to await first signal");
34 send_signal(libc
::SIGUSR1
);
36 second_rt
.block_on(second_signal
.recv());
40 tokio
::runtime
::Builder
::new_current_thread()