Function futures_micro::waker [−][src]
pub fn waker() -> impl Future<Output = Waker>
Get the Waker
inside an async fn where you aren’t supposed to
have it.
This is a low level primitive for implementing more complex
patterns while avoiding the Poll
API.
Examples
use futures_micro::{sleep, waker}; let waker = waker().await; assert_eq!(async { waker.wake(); sleep().await; 1 }.await, 1)