pub fn dispatch_foreground<F, T>(future: F) -> impl Handle<T>Expand description
Spawns a foreground task.
This function can either be called from a foreground thread or a background thread, and the future must be Send since the future is sent to the foreground thread when dispatching from a background thread. The result will also need to be moved to the background thread.