pub type Spinlock<T> = Mutex<RawSpinlock, T>;Available on crate feature
full and non-crate feature use_std only.Expand description
A mutual exclusion primitive useful for protecting shared data.
This spinlock will block threads waiting for the lock to become available. The
spinlock can also be statically initialized or created via a new
constructor. Each spinlock has a type parameter which represents the data that
it is protecting. The data can only be accessed through the RAII guards
returned from lock and try_lock, which guarantees that the data is only
ever accessed when the spinlock is locked.
Aliased Typeยง
pub struct Spinlock<T> { /* private fields */ }