1个不稳定版本
0.1.0 | 2022年7月20日 |
---|
#1353 in 异步
10KB
149 行
limited-join
提供有限并发连接的零依赖future。
示例
// Pretend we have a ton of files we want to download, but don't want to overwhelm the server.
let futures = files_to_download.into_iter().map(download::download_file);
// Let's limit the number of concurrent downloads to 4, and wait for all the files to download.
limited_join::join(futures, 4).await;