wait-for-me
Async CountDownLatch
Install
Install from crates.io
[dependencies]
wait-for-me = "0.1"
Example
with smol
```rust
use waitforme::CountDownLatch;
use smol::Task;
[smol_potat::main]
async fn main() -> Result<(), Box> {
let latch = CountDownLatch::new(10);
for _ in 0..10 {
let latch1 = latch.clone();
Task::spawn(async move {
latch1.count_down().await;
}).detach();
}
latch.wait().await;
Ok(())
}
```