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
Unresolved Questions
It is likely that the reader protocol for the futex implementation will need to change. See below.
How to go about implementing downgrade for the queue.rs implementation?
Does the solid_asp3 platform already have a downgrade method on their RwLock implementation?
Does lock poisoning play into this at all?
Feature gate:
#![feature(rwlock_downgrade)]This is a tracking issue for a
downgrademethod forRwLockas discussed in rust-lang/libs-team#392.The
downgrademethod onRwLockWriteGuardwill transform a write-lockedRwLockinto a read-locked one.Public API
Steps / History
RwLockdowngrademethod libs-team#392downgradeimplementation forfutex.rsdowngradeimplementation forno_threads.rsdowngradeimplementation forqueue.rsdowngradeimplementation forsolid.rsdowngradeimplementation forteeos.rsrwlock_downgradelibrary feature #143191Unresolved 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?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩