[−][src]Function futures_test::task::panic_spawner_mut
pub fn panic_spawner_mut() -> &'static mut PanicSpawner
Get a reference to a singleton instance of PanicSpawner
.
Examples
#![feature(async_await, futures_api)] use futures::task::{self, SpawnExt}; 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.spawner().spawn(async { }); // Will panic