Open
Description
Feature gate: #![feature(rwlock_try_upgrade)]
This is a tracking issue RwLock::try_upgrade
, which turns a read guard into a write guard if it is the only lock accessor.
Public API
// src/sync/rwlock.rs
impl<'a, T: ?Sized> RwLockReadGuard<'a, T> {
pub fn try_upgrade(orig: Self) -> Result<RwLockWriteGuard<'a, T>, RwLockReadGuard<'a, T>>;
}
Steps / History
(Remember to update the S-tracking-*
label when checking boxes.)
- ACP: Add
Rwlock
try_upgrade
method libs-team#514 - Partial implementation Rwlock try upgrade #138560
- Clippy lint to avoid calling
try_upgrade
in a loop (not blocking) - Miri tie-in (not blocking)
- Implementation: #...
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.