@@ -50,6 +50,7 @@ in the Rust standard library:
5050 library versions of those types.
51517 . ` RwLock ` takes advantage of hardware lock elision on processors that
5252 support it, which can lead to huge performance wins with many readers.
53+ This must be enabled with the ` hardware-lock-elision ` feature.
53548 . ` RwLock ` uses a task-fair locking policy, which avoids reader and writer
5455 starvation, whereas the standard library version makes no guarantees.
55569 . ` Condvar ` is guaranteed not to produce spurious wakeups. A thread will
@@ -93,8 +94,6 @@ There are a few restrictions when using this library on stable Rust:
9394- You will have to use the ` const_* ` functions (e.g. ` const_mutex(val) ` ) to
9495 statically initialize the locking primitives. Using e.g. ` Mutex::new(val) `
9596 does not work on stable Rust yet.
96- - ` RwLock ` will not be able to take advantage of hardware lock elision for
97- readers, which improves performance when there are multiple readers.
9897- The ` wasm32-unknown-unknown ` target is only supported on nightly and requires
9998 ` -C target-feature=+atomics ` in ` RUSTFLAGS ` .
10099
@@ -126,6 +125,10 @@ To allow sending `MutexGuard`s and `RwLock*Guard`s to other threads, enable the
126125Note that the ` deadlock_detection ` and ` send_guard ` features are incompatible
127126and cannot be used together.
128127
128+ Hardware lock elision support for x86 can be enabled with the
129+ ` hardware-lock-elision ` feature. This requires Rust 1.59 due to the use of
130+ inline assembly.
131+
129132The core parking lot API is provided by the ` parking_lot_core ` crate. It is
130133separate from the synchronization primitives in the ` parking_lot ` crate so that
131134changes to the core API do not cause breaking changes for users of ` parking_lot ` .
0 commit comments