11 unstable releases

0.6.0 Sep 7, 2020
0.5.0 Nov 4, 2019
0.4.0 Aug 24, 2019
0.3.3 Jan 30, 2019
0.1.1 Jun 7, 2018

#64 in Asynchronous

Download history 3096/week @ 2020-11-10 2716/week @ 2020-11-17 2533/week @ 2020-11-24 2228/week @ 2020-12-01 2409/week @ 2020-12-08 1897/week @ 2020-12-15 608/week @ 2020-12-22 815/week @ 2020-12-29 1484/week @ 2021-01-05 2217/week @ 2021-01-12 2025/week @ 2021-01-19 1969/week @ 2021-01-26 2083/week @ 2021-02-02 2268/week @ 2021-02-09 2152/week @ 2021-02-16 2322/week @ 2021-02-23

13,415 downloads per month
Used in 10 crates (4 directly)

MIT/Apache

44KB
673 lines

futures-locks

A library of Futures-aware locking primitives. These locks can safely be used in asynchronous environments like Tokio. When they block, they'll only block a single task, not the entire reactor.

Build Status CodeCov.io

# Cargo.toml
[dependencies]
futures = "0.3.1"
futures-locks = "0.6"

Usage

Generally, the provided primitives work much like their counterparts from the standard library. But instead of blocking until ready, they return Futures which will become ready when the lock is acquired. See the doc comments for individual examples.

futures-locks requires Rust 1.39.0 or higher.

License

futures-locks is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, and LICENSE-MIT for details

Dependencies

~2.5MB
~42K SLoC