#[repr(align(64))]pub struct Padded<T>(pub T);Expand description
Cache-line padding to prevent false sharing between hot atomics.
Wraps a value with #[repr(align(64))] to ensure it occupies its
own cache line. Used internally for cursor trackers and the ring
cursor.
Exposed publicly so that DependencyBarrier::new
and Subscriber::tracker can refer to
Arc<Padded<AtomicU64>> in their signatures.
Tuple Fields§
§0: TAuto Trait Implementations§
impl<T> Freeze for Padded<T>where
T: Freeze,
impl<T> RefUnwindSafe for Padded<T>where
T: RefUnwindSafe,
impl<T> Send for Padded<T>where
T: Send,
impl<T> Sync for Padded<T>where
T: Sync,
impl<T> Unpin for Padded<T>where
T: Unpin,
impl<T> UnsafeUnpin for Padded<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Padded<T>where
T: UnwindSafe,
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