[][src]Trait heaparray::naive_rc::AtomicArrayRef

pub trait AtomicArrayRef: BaseArrayRef + Sized {
    fn as_ref(&self) -> usize;
fn compare_and_swap(
        &self,
        current: usize,
        new: Self,
        order: Ordering
    ) -> Self;
fn compare_exchange(
        &self,
        current: usize,
        new: Self,
        success: Ordering,
        failure: Ordering
    ) -> Result<Self, Self>;
fn compare_exchange_weak(
        &self,
        current: usize,
        new: Self,
        success: Ordering,
        failure: Ordering
    ) -> Result<Self, Self>;
fn swap(&self, ptr: Self, order: Ordering) -> Self; }

Atomically modified array reference. Guarrantees that all operations on the array reference are atomic (i.e. all changes to the internal array pointer). Additionally, guarrantees that all reads to a reference of this pointer use atomic loads.

For more details on the expected behavior of these methods, see the documentation for std::sync::atomic::AtomicPtr.

Required methods

fn as_ref(&self) -> usize

fn compare_and_swap(&self, current: usize, new: Self, order: Ordering) -> Self

fn compare_exchange(
    &self,
    current: usize,
    new: Self,
    success: Ordering,
    failure: Ordering
) -> Result<Self, Self>

fn compare_exchange_weak(
    &self,
    current: usize,
    new: Self,
    success: Ordering,
    failure: Ordering
) -> Result<Self, Self>

fn swap(&self, ptr: Self, order: Ordering) -> Self

Loading content...

Implementors

impl<E, L> AtomicArrayRef for AtomicPtrArray<E, L>[src]

Loading content...