limited-join

Crates.iolimited-join
lib.rslimited-join
version0.1.0
sourcesrc
created_at2022-07-20 00:08:00.650527
updated_at2022-07-20 00:08:00.650527
descriptionA zero-dependency crate providing a join future with limited concurrency
homepagehttps://github.com/zebp/limited-join
repositoryhttps://github.com/zebp/limited-join
max_upload_size
id628588
size10,833
Zeb Piasecki (zebp)

documentation

https://docs.rs/limited-join

README

limited-join

Docs.rs Crates.io Unlicense

A zero-dependency crate providing a join future with limited concurrency.

Example

// 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;
Commit count: 2

cargo fmt