[][src]Function lelet::spawn

pub fn spawn<F, R>(task: F) -> JoinHandle<R> where
    F: 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