pub fn spawn<F>(future: F) where
F: Future<Item = (), Error = ()> + 'static,
Executes a future on the current thread.
The provided future must complete or be canceled before
run will return.
tokio::spawn, this function will always spawn on a
CurrentThread executor and is able to spawn futures that are not
This function can only be invoked from the context of a
run call; any
other use will result in a panic.