spawn

Function spawn 

Source
pub fn spawn<T, F>(data: T, f: F) -> Outer<T>
where T: Send + 'static, F: FnOnce(Inner<T>) + Send + 'static,
Expand description

Spawns a new thread, return data warpped in Outer