Rust异步编程123456789101112let mut handles = Vec::new();for index in 1..=100 { let handle = tokio::spawn( async_http_client.get(format!("www.example.com/items/{}", index)) ); handles.push(handle);}for handle in handles { let result = handle.await;} 比较使用异步编写的示例与同步编写的相同示例 - 对于大量并发 Web 请求,异步版本比同步请求快约 60%