-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
@connortsui20
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: 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 implementingdowngrade
for thequeue.rs
implementation? (削除ここまで)(削除) Does thesolid_asp3
platform already have adowngrade
method on theirRwLock
implementation? (削除ここまで)(削除) Does lock poisoning play into this at all? (削除ここまで)