29 stable releases (3 major)

3.4.0 Jun 1, 2024
3.3.0 Jan 10, 2024
3.2.0 Dec 2, 2023
3.1.2 Nov 24, 2023
0.1.0 May 22, 2019

#5 in Concurrency

Download history 1161675/week @ 2024-08-22 1098387/week @ 2024-08-29 1185812/week @ 2024-09-05 1128299/week @ 2024-09-12 1126791/week @ 2024-09-19 1192680/week @ 2024-09-26 1155975/week @ 2024-10-03 1092352/week @ 2024-10-10 1134271/week @ 2024-10-17 1118263/week @ 2024-10-24 1063334/week @ 2024-10-31 1064887/week @ 2024-11-07 1143822/week @ 2024-11-14 1042375/week @ 2024-11-21 931453/week @ 2024-11-28 916575/week @ 2024-12-05

4,229,848 downloads per month
Used in 5,354 crates (154 directly)

Apache-2.0 OR MIT

155KB
2.5K SLoC

async-lock

Build License Cargo Documentation

Async synchronization primitives.

This crate provides the following primitives:

  • Barrier - enables tasks to synchronize all together at the same time.
  • Mutex - a mutual exclusion lock.
  • RwLock - a reader-writer lock, allowing any number of readers or a single writer.
  • Semaphore - limits the number of concurrent operations.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.3–24MB
~337K SLoC