summaryrefslogtreecommitdiffstats
path: root/tokio/src/signal/registry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/signal/registry.rs')
-rw-r--r--tokio/src/signal/registry.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/tokio/src/signal/registry.rs b/tokio/src/signal/registry.rs
index e70d0495..d608539c 100644
--- a/tokio/src/signal/registry.rs
+++ b/tokio/src/signal/registry.rs
@@ -178,13 +178,13 @@ where
#[cfg(all(test, not(loom)))]
mod tests {
use super::*;
- use crate::runtime::current_thread::Runtime;
+ use crate::runtime::{self, Runtime};
use crate::sync::{mpsc, oneshot};
use futures::{future, StreamExt};
#[test]
fn smoke() {
- let mut rt = Runtime::new().unwrap();
+ let mut rt = rt();
rt.block_on(async move {
let registry = Registry::new(vec![
EventInfo::default(),
@@ -307,4 +307,8 @@ mod tests {
drop(second_rx);
}
+
+ fn rt() -> Runtime {
+ runtime::Builder::new().current_thread().build().unwrap()
+ }
}