Function spawn

Source
pub fn spawn<F: Future<Output = ()> + Send + 'static>(f: F)
Examples found in repository?
examples/server.rs (line 16)
10async fn listen(addr: &str) {
11    let addr: SocketAddr = addr.parse().unwrap();
12    let listener = AsyncTcpListener::bind(addr).unwrap();
13    let mut incoming = listener.incoming();
14
15    while let Some(stream) = incoming.next().await {
16        fahrenheit::spawn(process(stream));
17    }
18}