- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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 RwLockdowngrademethod libs-team#392
-  Implementation: Rwlock downgrade #128219
-  downgradeimplementation forfutex.rs
-  downgradeimplementation forno_threads.rs
-  downgradeimplementation forqueue.rs
-  downgradeimplementation forsolid.rs
-  downgradeimplementation forteeos.rs
 
-  
- Final comment period (FCP)1
-  Stabilization PR: Stabilize rwlock_downgradelibrary 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 implementing- downgradefor the- queue.rsimplementation?
- Does the- solid_asp3platform already have a- downgrademethod on their- RwLockimplementation?
- Does lock poisoning play into this at all?
Footnotes
aliksend and RedKinda
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.