Struct swiss_army_knife::hardware_optimized_spin_lock::IntelHardwareOptimizedLockSpinLock [−][src]
pub struct IntelHardwareOptimizedLockSpinLock(_);
Expand description
An efficient, CAS-free unfair spin lock that uses an atomic exchange and only requires one byte of memory.
Uses Intel TSX Hardware Lock Elision (which should be backwards compatible) to create a spin lock. Inspiration from https://github.com/cyfdecyf/spinlock, https://software.intel.com/en-us/articles/tsx-anti-patterns-in-lock-elision-code and http://locklessinc.com/articles/locks/.
Trait Implementations
Returns true if acquired spin lock.
Returns true if acquired spin lock.
Unlocks the spin lock.
Returns true if unlocked.
Forcibly unlocks the spin lock, even if it is currently unlocked. Read more
Auto Trait Implementations
impl Send for IntelHardwareOptimizedLockSpinLock
impl Unpin for IntelHardwareOptimizedLockSpinLock