tokio::task::coop

Function poll_budget_available

Source
pub(crate) fn poll_budget_available(cx: &mut Context<'_>) -> Poll<()>
Expand description

Returns Poll::Ready if the current task has budget to consume, and Poll::Pending otherwise.

Note that in contrast to poll_proceed, this method does not consume any budget and is used when polling for budget availability.