asyncify

Function asyncify 

Source
fn asyncify<T>(
    f: impl FnOnce() -> T + Send + 'static,
) -> impl Future<Output = T>
where T: Send + 'static,
Expand description

Run the closure on a thread where blocking is allowed

ยงPanics

If the closure panics