pub struct Global;
Expand description
The default, global lock.
The lock is stored out-of-band, globally. This means that one ArcSwap
with this lock storage
is only one machine word large, but a lock on one instance blocks the other, independent ones.
It has several shards so threads are less likely to collide (HW-contend) on them.
Trait Implementations
sourceimpl LockStorage for Global
impl LockStorage for Global
sourcefn gen_idx(&self) -> &AtomicUsize
fn gen_idx(&self) -> &AtomicUsize
Access to the generation index. Read more
sourcefn choose_shard(&self) -> usize
fn choose_shard(&self) -> usize
Pick one shard of the all selected. Read more
Auto Trait Implementations
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more