/rust/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/common/task.rs
Line | Count | Source (jump to first uncovered line) |
1 | | use std::{ |
2 | | convert::Infallible, |
3 | | task::{Context, Poll}, |
4 | | }; |
5 | | |
6 | | /// A function to help "yield" a future, such that it is re-scheduled immediately. |
7 | | /// |
8 | | /// Useful for spin counts, so a future doesn't hog too much time. |
9 | 0 | pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<Infallible> { |
10 | 0 | cx.waker().wake_by_ref(); |
11 | 0 | Poll::Pending |
12 | 0 | } Unexecuted instantiation: hyper::common::task::yield_now Unexecuted instantiation: hyper::common::task::yield_now Unexecuted instantiation: hyper::common::task::yield_now |