pub struct WorkerSlot<K, V> { /* private fields */ }Expand description
Per-worker exclusive slot holding a BatchBuf inside an UnsafeCell.
The WORKER_ID TLS invariant guarantees that only one thread ever accesses any given slot, eliminating the need for any synchronisation primitive on the insert hot-path (zero atomics, zero locks, pure memory write).
Implementations§
Source§impl<K, V> WorkerSlot<K, V>
impl<K, V> WorkerSlot<K, V>
Trait Implementations§
impl<K: Send, V: Send> Send for WorkerSlot<K, V>
impl<K: Send + Sync, V: Send + Sync> Sync for WorkerSlot<K, V>
Auto Trait Implementations§
impl<K, V> !Freeze for WorkerSlot<K, V>
impl<K, V> !RefUnwindSafe for WorkerSlot<K, V>
impl<K, V> Unpin for WorkerSlot<K, V>
impl<K, V> UnsafeUnpin for WorkerSlot<K, V>where
K: UnsafeUnpin,
V: UnsafeUnpin,
impl<K, V> UnwindSafe for WorkerSlot<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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