Skip to main content

spawn

Function spawn 

Source
pub fn spawn(future: impl Future<Output = ()> + 'static) -> TaskId
Expand description

Run future to completion, polling it as it is woken.

Returns immediately; the future continues on the browser’s event loop. This is the entry point every asynchronous operation ultimately needs, and the reason a page does not have to supply a runtime.