Struct crossbeam_utils::sync::sharded_lock::Shard
source · struct Shard {
lock: RwLock<()>,
write_guard: UnsafeCell<Option<RwLockWriteGuard<'static, ()>>>,
}
Expand description
A shard containing a single reader-writer lock.
Fields§
§lock: RwLock<()>
The inner reader-writer lock.
write_guard: UnsafeCell<Option<RwLockWriteGuard<'static, ()>>>
The write-guard keeping this shard locked.
Write operations will lock each shard and store the guard here. These guards get dropped at the same time the big guard is dropped.
Auto Trait Implementations§
impl !Freeze for Shard
impl !RefUnwindSafe for Shard
impl !Send for Shard
impl !Sync for Shard
impl Unpin for Shard
impl UnwindSafe for Shard
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more