[][src]Function futures_test::task::noop_local_waker_ref

pub fn noop_local_waker_ref() -> &'static LocalWaker

Get a thread local reference to a LocalWaker referencing a singleton instance of NoopWake.

Examples

#![feature(async_await, futures_api)]
use futures::task;
use futures_test::task::{noop_local_waker_ref, noop_spawner_mut};

let mut cx = task::Context::new(
    noop_local_waker_ref(),
    noop_spawner_mut(),
);

cx.waker().wake();