pub struct CASContentionSource { /* private fields */ }Expand description
CAS contention entropy source.
Spawns multiple threads that perform atomic compare-and-swap on shared targets spread across cache lines. The arbitration timing between threads competing for the same cache line is physically nondeterministic because:
- The cache coherence protocol (MOESI on Apple Silicon) arbitrates concurrent exclusive-access requests nondeterministically.
- The interconnect fabric latency varies with thermal state and traffic.
- Each thread’s CAS targets are chosen pseudo-randomly, creating unpredictable contention patterns.
- XOR-combining timings from all threads amplifies the arbitration entropy.
Implementations§
Source§impl CASContentionSource
impl CASContentionSource
pub fn new(config: CASContentionConfig) -> Self
Trait Implementations§
Source§impl Default for CASContentionSource
impl Default for CASContentionSource
Source§impl EntropySource for CASContentionSource
impl EntropySource for CASContentionSource
Auto Trait Implementations§
impl Freeze for CASContentionSource
impl RefUnwindSafe for CASContentionSource
impl Send for CASContentionSource
impl Sync for CASContentionSource
impl Unpin for CASContentionSource
impl UnwindSafe for CASContentionSource
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