Tracking Issue for atomic_try_update
· Issue #135894 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Feature gate: #![feature(atomic_try_update)]
This is a tracking issue for an infallible version of AtomicT::fetch_update
as well as a new name for the existing fallible version.
When and if this gets stabilized, the existing fetch_update
should be marked as a deprecated alias for try_update
.
Public API
impl AtomicT {
// same as fetch_update
pub fn try_update(
&self,
set_order: Ordering,
fetch_order: Ordering,
f: impl FnMut(T) -> Option,
) -> Result<T, T>;
pub fn update(
&self,
set_order: Ordering,
fetch_order: Ordering,
f: impl FnMut(T) -> T,
) -> T;
}
Steps / History
- ACP: Infallible version of fetch_update libs-team#490
- Design requested by t-libs-api in Implement AtomicT::update & AtomicT::try_update #133829 (comment)
- Implementation: Implement AtomicT::update & AtomicT::try_update #133829
- Final comment period (FCP)1
- Stabilization PR