pub fn spawn_foreground<F, T>(future: F) -> impl Handle<T>where
F: Future<Output = T> + 'static,
T: 'static,Expand description
Spawn a foreground task from foreground thread.
This function can only be called from the foreground thread. Actually, if a background thread want to run a task in foreground thread, the Future must be Send, while this method does not enforces it.