wait-counter 0.1.2

A counter allow you to wait, and return when it reach 1
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# wait-counter


```rust
let counter = WaitCounter::new();
let cloned = counter.clone();
tokio::spawn(async move {
    // After simulating time-consuming operations, drop the cloned instance
    tokio::time::sleep(Duration::from_millis(1000)).await;
    drop(cloned);
});

counter.wait().await;
println!("Counter reached 1");
```