futures_test::task

Function noop_spawner_mut

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

Get a reference to a singleton instance of NoopSpawner.

ยงExamples

use futures::task::SpawnExt;
use futures_test::task::noop_spawner_mut;

let spawner = noop_spawner_mut();
spawner.spawn(async { }).unwrap();