1#[cfg(feature = "http1")]
2use super::Never;
3pub(crate) use std::task::{Context, Poll};
4
5/// A function to help "yield" a future, such that it is re-scheduled immediately.
6///
7/// Useful for spin counts, so a future doesn't hog too much time.
8#[cfg(feature = "http1")]
9pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<Never> {
10 cx.waker().wake_by_ref();
11 Poll::Pending
12}
13