pub struct RelaxedCounter { /* private fields */ }Expand description
An AtomicIsize padded and aligned to the cache line size to combat
false sharing.
As a Counter, this type uses Ordering::Relaxed for
Counter::add_assign, Counter::sub_assign and Counter::fetch.
Trait Implementations§
Source§impl Counter for RelaxedCounter
impl Counter for RelaxedCounter
Source§fn add_assign(&self, n: isize)
fn add_assign(&self, n: isize)
Eventually increase the value of this counter by
n.Source§fn sub_assign(&self, n: isize)
fn sub_assign(&self, n: isize)
Eventually decrease the value of this counter by
n.Auto Trait Implementations§
impl !Freeze for RelaxedCounter
impl RefUnwindSafe for RelaxedCounter
impl Send for RelaxedCounter
impl Sync for RelaxedCounter
impl Unpin for RelaxedCounter
impl UnwindSafe for RelaxedCounter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more