diff options
author | Carl Lerche <me@carllerche.com> | 2020-05-06 19:02:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 19:02:07 -0700 |
commit | 4748b2571fc02d5ebbfe59e457f0e8d8ef0eb5f3 (patch) | |
tree | 73da1e3baba02bad5411a222ff62490304932fe7 /tokio/src/macros | |
parent | 66fef4a9bcccd944e3b72b1e83f789e4131d4e52 (diff) |
rt: simplify coop implementation (#2498)
Simplifies coop implementation. Prunes unused code, create a `Budget`
type to track the current budget.
Diffstat (limited to 'tokio/src/macros')
-rw-r--r-- | tokio/src/macros/cfg.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tokio/src/macros/cfg.rs b/tokio/src/macros/cfg.rs index 618b8f66..288f58d2 100644 --- a/tokio/src/macros/cfg.rs +++ b/tokio/src/macros/cfg.rs @@ -363,3 +363,23 @@ macro_rules! cfg_unstable { )* } } + +macro_rules! cfg_coop { + ($($item:item)*) => { + $( + #[cfg(any( + feature = "blocking", + feature = "dns", + feature = "fs", + feature = "io-driver", + feature = "io-std", + feature = "process", + feature = "rt-core", + feature = "sync", + feature = "stream", + feature = "time" + ))] + $item + )* + } +} |