pub(crate) fn budget<R>(f: impl FnOnce() -> R) -> R
Runs the given closure with a cooperative task budget. When the function returns, the budget is reset to the value prior to calling the function.