pub fn spawn<T, F>(f: F) -> JoinHandle<T>where
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,Available on crate feature
multitask only.Expand description
Spawns a new thread, returning a JoinHandle for it.
The join handle provides a join method that can be used to join the
spawned thread.
The default task name is an empty string. The default thread stack size is
arceos_api::config::TASK_STACK_SIZE.