WAG

Go like sync.WaitGroup implementation in Rust. (sync/async)

CI Crates.io Licensed Twitter

| Examples | Docs | Latest Note |

toml wag = "0.1.0"

How to use,

rust use wag::WaitGroup;

```rust let wg = WaitGroup::new();

wg.adds::<10>().for_each(|child| {

thread::spawn(move || {
    // ...
    child.done();
});

}); wg.wait(); // or wg.async_wait().await; ```

```rust let wg = WaitGroup::new();

for _ in 0..10 { let w = wg.add();

thread::spawn(move || {
    // ...
    w.done();
});

}); wg.wait(); // or wg.async_wait().await; ```