Tracking Issue for `atomic_try_update`

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

Unresolved Questions

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html