Struct arc_swap::gen_lock::Global [−][src]
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
impl LockStorage for Global
[src]
impl LockStorage for Global
[src]fn gen_idx(&self) -> &AtomicUsize
[src]
fn gen_idx(&self) -> &AtomicUsize
[src]Access to the generation index. Read more
fn choose_shard(&self) -> usize
[src]
fn choose_shard(&self) -> usize
[src]Pick one shard of the all selected. Read more