Skip to main content

spawn_worker

Function spawn_worker 

Source
pub fn spawn_worker<F>(name: impl Into<String>, body: F) -> Result<()>
where F: FnOnce() + Send + 'static,
Expand description

Run body on a worker thread where the target has them, and inline where it has none (a browser page). A caller that owns one long-lived loop for its own work keeps one shape on every target without selecting by target itself.

ยงErrors

As spawn_thread; the inline path has none.