spawn_local

Function spawn_local 

Source
pub fn spawn_local<O, F>(future: F) -> Result<()>
where O: Default + 'static, F: Future<Output = O> + Send + 'static,
Expand description

派发任务到本地线程绑定的异步运行时,如果本地线程没有异步运行时,则返回错误 注意:F::Output如果与本地线程绑定的运行时的O不相同,则无法执行指定任务