Skip to content

Commit

Permalink
Always inline call to budget
Browse files Browse the repository at this point in the history
It is likely to be on _very_ critical paths.
  • Loading branch information
jonhoo committed Mar 5, 2020
1 parent a2305a5 commit 7bda78b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tokio/src/coop.rs
Expand Up @@ -69,6 +69,7 @@ thread_local! {
/// Run the given closure with a cooperative task budget.
///
/// Enabling budgeting when it is already enabled is a no-op.
#[inline(always)]
pub(crate) fn budget<F, R>(f: F) -> R
where
F: FnOnce() -> R,
Expand Down

0 comments on commit 7bda78b

Please sign in to comment.