[][src]Function futures_test::task::panic_local_waker_ref

pub fn panic_local_waker_ref() -> &'static LocalWaker

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

Examples

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

let mut cx = task::Context::new(
    panic_local_waker_ref(),
    panic_spawner_mut(),
);

cx.waker().wake(); // Will panic