[][src]Function futures_test::task::noop_spawner_mut

pub fn noop_spawner_mut() -> &'static mut NoopSpawner

Get a reference to a singleton instance of NoopSpawner.

Examples

#![feature(async_await, futures_api)]
use futures::task::{self, SpawnExt};
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.spawner().spawn(async { });