Skip to main content

spawn_blocking

Function spawn_blocking 

Source
pub async fn spawn_blocking<F, T>(f: F) -> T
where F: FnOnce() -> T + Send + Sync + 'static, T: Send + 'static,
Expand description

Run a blocking closure off the async executor and await its result.