#wait-group #async-await #sync #async #wake #notify

no-std wg

Golang like WaitGroup implementation for sync/async Rust

6 releases (3 breaking)

0.9.2 Oct 6, 2024
0.9.1 Apr 27, 2024
0.8.3 Apr 20, 2024
0.8.1 Mar 13, 2024
0.2.0 Nov 30, 2021

#120 in Asynchronous

Download history 2168/week @ 2024-07-25 2281/week @ 2024-08-01 1666/week @ 2024-08-08 1490/week @ 2024-08-15 1709/week @ 2024-08-22 1505/week @ 2024-08-29 1404/week @ 2024-09-05 1392/week @ 2024-09-12 2666/week @ 2024-09-19 1817/week @ 2024-09-26 1868/week @ 2024-10-03 1617/week @ 2024-10-10 1500/week @ 2024-10-17 1313/week @ 2024-10-24 1498/week @ 2024-10-31 802/week @ 2024-11-07

5,451 downloads per month
Used in 28 crates (9 directly)

MIT/Apache

34KB
368 lines

wg

Golang like WaitGroup implementation for sync/async Rust, support no_std environment.

github Build codecov

docs.rs crates.io crates.io

license

Introduction

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.

Installation

  • 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"] }
    

Examples

Please see examples for details.

Acknowledgements

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.5–5.5MB
~20K SLoC