#join #limited #future #download #concurrency #server #zero-dependency

limited-join

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

1 unstable release

0.1.0 Jul 20, 2022

#1648 in Asynchronous

MIT license

10KB
149 lines

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;

No runtime deps