diff options
Diffstat (limited to 'tokio/src/coop.rs')
-rw-r--r-- | tokio/src/coop.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tokio/src/coop.rs b/tokio/src/coop.rs index 19302559..78905e3c 100644 --- a/tokio/src/coop.rs +++ b/tokio/src/coop.rs @@ -98,6 +98,13 @@ where }) } +cfg_rt_threaded! { + #[inline(always)] + pub(crate) fn has_budget_remaining() -> bool { + HITS.with(|hits| hits.get() > 0) + } +} + cfg_blocking_impl! { /// Forcibly remove the budgeting constraints early. pub(crate) fn stop() { |