summaryrefslogtreecommitdiffstats
path: root/tokio/src/runtime/enter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/runtime/enter.rs')
-rw-r--r--tokio/src/runtime/enter.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tokio/src/runtime/enter.rs b/tokio/src/runtime/enter.rs
index 79ed4d17..4dd8dd01 100644
--- a/tokio/src/runtime/enter.rs
+++ b/tokio/src/runtime/enter.rs
@@ -4,7 +4,7 @@ use std::marker::PhantomData;
#[derive(Debug, Clone, Copy)]
pub(crate) enum EnterContext {
- #[cfg_attr(not(feature = "rt-core"), allow(dead_code))]
+ #[cfg_attr(not(feature = "rt"), allow(dead_code))]
Entered {
allow_blocking: bool,
},
@@ -24,7 +24,7 @@ pub(crate) struct Enter {
_p: PhantomData<RefCell<()>>,
}
-cfg_rt_core! {
+cfg_rt! {
use crate::park::thread::ParkError;
use std::time::Duration;
@@ -65,7 +65,7 @@ cfg_rt_core! {
//
// This is hidden for a reason. Do not use without fully understanding
// executors. Misuing can easily cause your program to deadlock.
-cfg_rt_threaded! {
+cfg_rt_multi_thread! {
pub(crate) fn exit<F: FnOnce() -> R, R>(f: F) -> R {
// Reset in case the closure panics
struct Reset(EnterContext);
@@ -91,7 +91,7 @@ cfg_rt_threaded! {
}
}
-cfg_rt_util! {
+cfg_rt! {
/// Disallow blocking in the current runtime context until the guard is dropped.
pub(crate) fn disallow_blocking() -> DisallowBlockingGuard {
let reset = ENTERED.with(|c| {
@@ -130,14 +130,14 @@ cfg_rt_util! {
}
}
-cfg_rt_threaded! {
+cfg_rt_multi_thread! {
/// Returns true if in a runtime context.
pub(crate) fn context() -> EnterContext {
ENTERED.with(|c| c.get())
}
}
-cfg_rt_core! {
+cfg_rt! {
impl Enter {
/// Blocks the thread on the specified future, returning the value with
/// which that future completes.