hyper 1.0.1

A fast and correct HTTP library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
use std::task::{Context, Poll};

/// A function to help "yield" a future, such that it is re-scheduled immediately.
///
/// Useful for spin counts, so a future doesn't hog too much time.
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<std::convert::Infallible> {
    cx.waker().wake_by_ref();
    Poll::Pending
}