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§
source§impl LockStorage for Global
impl LockStorage for Global
source§fn gen_idx(&self) -> &AtomicUsize
fn gen_idx(&self) -> &AtomicUsize
Access to the generation index. Read more
source§fn choose_shard(&self) -> usize
fn choose_shard(&self) -> usize
Pick one shard of the all selected. Read more