await-group 0.1.0

Golang like WaitGroup implementation
Documentation
  • Coverage
  • 25%
    1 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 18.14 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 345.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Millione/await-group
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Millione

await-group

Crates.io License Build Status

Golang like WaitGroup implementation.

Usage

Add this to your Cargo.toml:

[build-dependencies]
await-group = "0.1"

Example

use await_group::AwaitGroup;

#[tokio::main]
async fn main() {
    let wg = AwaitGroup::new();
    for _ in 0..10 {
        let w = wg.clone();
        tokio::spawn(async move {
            _ = w;
        });
    }
    wg.await;
}

License

Dual-licensed under the MIT license and the Apache License (Version 2.0).

See LICENSE-MIT and LICENSE-APACHE for details.