#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

#116 in Asynchronous

Download history 1551/week @ 2024-07-15 1921/week @ 2024-07-22 2286/week @ 2024-07-29 1861/week @ 2024-08-05 1595/week @ 2024-08-12 1578/week @ 2024-08-19 1946/week @ 2024-08-26 1101/week @ 2024-09-02 1444/week @ 2024-09-09 2379/week @ 2024-09-16 2248/week @ 2024-09-23 1411/week @ 2024-09-30 1720/week @ 2024-10-07 1689/week @ 2024-10-14 1390/week @ 2024-10-21 1276/week @ 2024-10-28

6,279 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–5MB
~20K SLoC