spawn

Function spawn 

Source
fn spawn(f: impl Future<Output = ()> + 'static)
Expand description

Runs a future to completion. On native this blocks via pollster, on wasm this spawns a local task. This allows the same async wgpu initialization code to work on both platforms.