Tracking Issue for rwlock_downgrade (original) (raw)
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
downgradeimplementation for futex.rsdowngradeimplementation for no_threads.rsdowngradeimplementation for queue.rsdowngradeimplementation for solid.rsdowngradeimplementation for teeos.rs
- Final comment period (FCP)1
- Stabilization PR: Stabilize rwlock_downgrade library feature #143191
Unresolved Questions
It is likely that the reader protocol for the futex implementation will need to change. See below.How to go about implementingdowngradefor thequeue.rsimplementation?Does thesolid_asp3platform already have adowngrademethod on theirRwLockimplementation?Does lock poisoning play into this at all?