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.)
Unresolved Questions
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
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)Rwlocktry_upgrademethod libs-team#514try_upgradein a loop (not blocking)Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩