By default, blocking version WaitGroup is enabled.
If you are using other async runtime, you need to
enbale future feature in your Cargo.toml and use wg::AsyncWaitGroup.
-
std
[dependencies] wg = "0.9"
-
future[dependencies] wg = { version = "0.9", features = ["future"] }
-
no_std
[dependencies] wg = { version = "0.9", default_features = false, features = ["alloc"] }
-
no_std & future
[dependencies] wg = { version = "0.9", default_features = false, features = ["alloc", "future"] }
Please see examples for details.
- Inspired by Golang sync.WaitGroup and
crossbeam_utils::WaitGroup.