summaryrefslogtreecommitdiffstats
path: root/tokio/src/macros/cfg.rs
diff options
context:
space:
mode:
authorDan Burkert <dan@danburkert.com>2020-04-24 06:25:48 -0600
committerGitHub <noreply@github.com>2020-04-24 15:25:48 +0300
commitd8139fef7a555f99adaa37e139787d26e24daba3 (patch)
tree5695a5fc6560ca851d12da04464747d161c55790 /tokio/src/macros/cfg.rs
parent9bcb50660e2d9de26a4373aaf4ab8f324c8ebbe8 (diff)
Add Handle::block_on method (#2437)
Diffstat (limited to 'tokio/src/macros/cfg.rs')
-rw-r--r--tokio/src/macros/cfg.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tokio/src/macros/cfg.rs b/tokio/src/macros/cfg.rs
index 18beb1bd..0679aa73 100644
--- a/tokio/src/macros/cfg.rs
+++ b/tokio/src/macros/cfg.rs
@@ -35,6 +35,22 @@ macro_rules! cfg_blocking_impl {
}
}
+/// Enables enter::block_on
+macro_rules! cfg_block_on {
+ ($($item:item)*) => {
+ $(
+ #[cfg(any(
+ feature = "blocking",
+ feature = "fs",
+ feature = "dns",
+ feature = "io-std",
+ feature = "rt-core",
+ ))]
+ $item
+ )*
+ }
+}
+
/// Enables blocking API internals
macro_rules! cfg_not_blocking_impl {
($($item:item)*) => {