Tracking Issue for `lock_value_accessors`
Open
Nobody has claimed this yet.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(lock_value_accessors)]
This is a tracking issue for feature lock_value_accessors.
Public API
impl<T> Mutex<T> {
pub fn get_cloned(&self) -> Result<T, PoisonError<()>> where T: Clone { ... }
pub fn set(&self, value: T) -> Result<(), PoisonError<T>> { ... }
pub fn replace(&self, value: T) -> LockResult<T> { ... }
}
impl<T> RwLock<T> {
pub fn get_cloned(&self) -> Result<T, PoisonError<()>> where T: Clone { ... }
pub fn set(&self, value: T) -> Result<(), PoisonError<T>> { ... }
pub fn replace(&self, value: T) -> LockResult<T> { ... }
}
impl<T> nonpoison::Mutex<T>
where
T: ?Sized
{
pub fn get_cloned(&self) -> T where T: Clone { ... }
pub fn set(&self, value: T) { ... }
pub fn replace(&self, value: T) -> T { ... }
pub fn with_mut<F, R>(&self, f: F) -> R where F: FnOnce(&mut T) -> R { ... }
}
impl<T> nonpoison::RwLock<T>
where
T: ?Sized
{
pub fn get_cloned(&self) -> T where T: Clone { ... }
pub fn set(&self, value: T) { ... }
pub fn replace(&self, value: T) -> T { ... }
pub fn with<F, R>(&self, f: F) -> R where F: FnOnce(&T) -> R { ... }
pub fn with_mut<F, R>(&self, f: F) -> R where F: FnOnce(&mut T) -> R { ... }
}
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/485
- Implementation: #133406
- Implementation: #147328
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Whether we should checking poisoning first and avoid unnecessary lock acquire attempts.
Links
- Follow-up ACP: https://github.com/rust-lang/libs-team/issues/497
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the public API and the completed implementation links, #133406 and #147328, then read ACPs 485 and 497 and the stabilization guide. The remaining work is the final comment period and stabilization PR; resolve the open poisoning question before considering the feature ready.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100