-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
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<T>,
) -> 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: Stabilize
atomic_try_updateand deprecatefetch_updatestarting 1.96.0 #148590
Unresolved Questions
Footnotes
joseluis
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.