crossbeam_epoch

Trait CompareAndSetOrdering

Source
pub trait CompareAndSetOrdering {
    // Required methods
    fn success(&self) -> Ordering;
    fn failure(&self) -> Ordering;
}
πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
Expand description

Memory orderings for compare-and-set operations.

A compare-and-set operation can have different memory orderings depending on whether it succeeds or fails. This trait generalizes different ways of specifying memory orderings.

The two ways of specifying orderings for compare-and-set are:

  1. Just one Ordering for the success case. In case of failure, the strongest appropriate ordering is chosen.
  2. A pair of Orderings. The first one is for the success case, while the second one is for the failure case.

Required Methods§

Source

fn success(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

The ordering of the operation when it succeeds.

Source

fn failure(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

The ordering of the operation when it fails.

The failure ordering can’t be Release or AcqRel and must be equivalent or weaker than the success ordering.

Implementations on Foreign Types§

Source§

impl CompareAndSetOrdering for (Ordering, Ordering)

Source§

fn success(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
Source§

fn failure(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
Source§

impl CompareAndSetOrdering for Ordering

Source§

fn success(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
Source§

fn failure(&self) -> Ordering

πŸ‘ŽDeprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

Implementors§