Open
Description
Feature gate: #![feature(rwlock_downgrade)]
This is a tracking issue for a downgrade
method for RwLock
as discussed in rust-lang/libs-team#392.
The downgrade
method on RwLockWriteGuard
will transform a write-locked RwLock
into a read-locked one.
Public API
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T> {
pub fn downgrade(s: Self) -> RwLockReadGuard<'a, T> {}
}
Steps / History
- ACP: Add a
RwLock
downgrade
method libs-team#392 - Implementation: Rwlock downgrade #128219
-
downgrade
implementation forfutex.rs
-
downgrade
implementation forno_threads.rs
-
downgrade
implementation forqueue.rs
-
downgrade
implementation forsolid.rs
-
downgrade
implementation forteeos.rs
-
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- It is likely that the reader protocol for the futex implementation will need to change. See below.
How to go about implementingdowngrade
for thequeue.rs
implementation?Does thesolid_asp3
platform already have adowngrade
method on theirRwLock
implementation?Does lock poisoning play into this at all?