Struct arc_swap::gen_lock::Global

source ·
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§

Returns the “default value” for a type. Read more
The type for keeping several shards. Read more
Access to the generation index. Read more
Access to the shards storage. Read more
Pick one shard of the all selected. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.