Skip to main content

run_sync

Function run_sync 

Source
pub fn run_sync<F, T>(future: F) -> T
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Run a future to completion synchronously.

If invoked outside an async runtime, a temporary current-thread runtime is used. If invoked within an active Tokio runtime, the future is driven in a dedicated thread to avoid blocking or nested-runtime issues.