[−][src]Function lelet::spawn
pub fn spawn<T, R>(task: T) -> JoinHandle<R> where
T: Future<Output = R> + Send + 'static,
R: Send + 'static,
Run the task in the background.
Just like goroutine in golang, there is no way to cancel a task,
but unlike goroutine you can await
the task
Panic
When a task panic, it will abort the entire program