pub struct SpinBackoff;Expand description
Emits a spin_loop and reloads the atomic value before retrying the CAS.
Trait Implementations§
Source§impl BackoffStrategy for SpinBackoff
impl BackoffStrategy for SpinBackoff
Source§fn backoff(&mut self) -> RetryStrategy
fn backoff(&mut self) -> RetryStrategy
Performs backoff and returns how the CAS should be retried. Read more
Source§fn will_reload(&self) -> bool
fn will_reload(&self) -> bool
Source§fn backoff_reload<T: PartialEq, F: FnMut() -> T>(
&mut self,
current: T,
reload: F,
) -> T
fn backoff_reload<T: PartialEq, F: FnMut() -> T>( &mut self, current: T, reload: F, ) -> T
Performs backoff after a failed CAS and reloads the atomic value according to the returned
RetryStrategy. Read moreSource§fn backoff_until<C: BackoffUntilCondition, F: FnMut() -> C>(
&mut self,
f: F,
) -> C::Result
fn backoff_until<C: BackoffUntilCondition, F: FnMut() -> C>( &mut self, f: F, ) -> C::Result
Loops until a condition is satisfied, performing backoff at each iteration.
Source§impl Debug for SpinBackoff
impl Debug for SpinBackoff
Source§impl Default for SpinBackoff
impl Default for SpinBackoff
Source§fn default() -> SpinBackoff
fn default() -> SpinBackoff
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpinBackoff
impl RefUnwindSafe for SpinBackoff
impl Send for SpinBackoff
impl Sync for SpinBackoff
impl Unpin for SpinBackoff
impl UnsafeUnpin for SpinBackoff
impl UnwindSafe for SpinBackoff
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