Spawns a new scoped thread.
fn scoped<'a, F>(f: F) -> Result<JoinGuard<'a>, Errno>
where F: FnOnce() -> () + Send + 'a,| Name | Description |
|---|---|
| f | The closure that will be run in the new thread. |
The thread will automatically be joined when the guard's destructor runs.