aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-10-21 21:50:55 +0200
committerJeff Vander Stoep <jeffv@google.com>2020-10-21 21:50:55 +0200
commit16823f4fe578338bc133988b377d01d29486901e (patch)
treea48ad005e42b21ab86e7c73beab3c96723e033d3 /README.md
parentdc306676c4cfcaaf7325911a2f9188972663bf04 (diff)
downloadparking_lot-16823f4fe578338bc133988b377d01d29486901e.tar.gz
Upgrade parking_lot to version 0.11.0
Test: TH Bug: 169931010 Change-Id: Ifb72995923062789a107a508a550a0fe7b128171
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 14 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3ec4cb0..d3e5b0b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
parking_lot
============
-[![Build Status](https://travis-ci.org/Amanieu/parking_lot.svg?branch=master)](https://travis-ci.org/Amanieu/parking_lot) [![Build status](https://ci.appveyor.com/api/projects/status/wppcc32ttpud0a30/branch/master?svg=true)](https://ci.appveyor.com/project/Amanieu/parking-lot/branch/master) [![Crates.io](https://img.shields.io/crates/v/parking_lot.svg)](https://crates.io/crates/parking_lot)
+![Rust](https://github.com/Amanieu/parking_lot/workflows/Rust/badge.svg)
+[![Crates.io](https://img.shields.io/crates/v/parking_lot.svg)](https://crates.io/crates/parking_lot)
[Documentation (synchronization primitives)](https://docs.rs/parking_lot/)
@@ -71,6 +72,8 @@ in the Rust standard library:
18. Optional support for [serde](https://docs.serde.rs/serde/). Enable via the
feature `serde`. **NOTE!** this support is for `Mutex`, `ReentrantMutex`,
and `RwLock` only; `Condvar` and `Once` are not currently supported.
+19. Lock guards can be sent to other threads when the `send_guard` feature is
+ enabled.
## The parking lot
@@ -92,6 +95,8 @@ There are a few restrictions when using this library on stable Rust:
does not work on stable Rust yet.
- `RwLock` will not be able to take advantage of hardware lock elision for
readers, which improves performance when there are multiple readers.
+- The `wasm32-unknown-unknown` target is only supported on nightly and requires
+ `-C target-feature=+atomics` in `RUSTFLAGS`.
To enable nightly-only functionality, you need to enable the `nightly` feature
in Cargo (see below).
@@ -102,19 +107,25 @@ Add this to your `Cargo.toml`:
```toml
[dependencies]
-parking_lot = "0.10"
+parking_lot = "0.11"
```
To enable nightly-only features, add this to your `Cargo.toml` instead:
```toml
[dependencies]
-parking_lot = { version = "0.10", features = ["nightly"] }
+parking_lot = { version = "0.11", features = ["nightly"] }
```
The experimental deadlock detector can be enabled with the
`deadlock_detection` Cargo feature.
+To allow sending `MutexGuard`s and `RwLock*Guard`s to other threads, enable the
+`send_guard` option.
+
+Note that the `deadlock_detection` and `send_guard` features are incompatible
+and cannot be used together.
+
The core parking lot API is provided by the `parking_lot_core` crate. It is
separate from the synchronization primitives in the `parking_lot` crate so that
changes to the core API do not cause breaking changes for users of `parking_lot`.