Module sharded_lock

Source

Structsยง

Registration ๐Ÿ”’
A registration of a thread with an index.
Shard ๐Ÿ”’
A shard containing a single reader-writer lock.
ShardedLock
A sharded reader-writer lock.
ShardedLockReadGuard
A guard used to release the shared read access of a ShardedLock when dropped.
ShardedLockWriteGuard
A guard used to release the exclusive write access of a ShardedLock when dropped.
ThreadIndices ๐Ÿ”’
The global registry keeping track of registered threads and indices.

Constantsยง

NUM_SHARDS ๐Ÿ”’
The number of shards per sharded lock. Must be a power of two.
REGISTRATION ๐Ÿ”’

Functionsยง

current_index ๐Ÿ”’
Returns a usize that identifies the current thread.
thread_indices ๐Ÿ”’