pub fn spin_on<F: Future>(future: F) -> F::Output {
    pin_utils::pin_mut!(future);
    let waker = &unsafe { Waker::from_raw(noop_waker()) };
    let mut cx = Context::from_waker(waker);
    loop {
        if let Poll::Ready(output) = future.as_mut().poll(&mut cx) {
            return output;
        }
        spin_loop_hint();
    }
}
/// Continuously poll a future until it returns `Poll::Ready`. This is not normally how an
/// executor should work, because it runs the CPU at 100%.
Continuously poll a future until it returns `Poll::Ready`. This is not normally how an
executor should work, because it runs the CPU at 100%.
Continuously poll a future until it returns ` Poll :: Ready ` . This is not normally how an executor should work because it runs the CPU at 100% .
pub fn spin_on<F: Future>(future: F) -> F::Output {
    pin_utils::pin_mut!(future);
    let waker = &unsafe { Waker::from_raw(noop_waker()) };
    let mut cx = Context::from_waker(waker);
    loop {
        if let Poll::Ready(output) = future.as_mut().poll(&mut cx) {
            return output;
        }
        spin_loop_hint();
    }
}
pub fn spin_on < F : Future > ( future : F ) -> F :: Output { pin_utils :: pin_mut ! ( future ) ; let waker = & unsafe { Waker :: from_raw ( noop_waker ( ) ) } ; let mut cx = Context :: from_waker ( waker ) ; loop { if let Poll :: Ready ( output ) = future . as_mut ( ) . poll ( & mut cx ) { return output ; } spin_loop_hint ( ) ; } }
Continuously poll a future until it returns `Poll::Ready`.
Continuously poll a future until it returns ` Poll :: Ready ` .
future
F
future
F