pub struct WriteSerialGuard { /* private fields */ }Expand description
RAII guard on the in-process write-serialization gate.
Owns a clone of the env’s Arc<AtomicBool> so it is Send + 'static (it does NOT borrow the env). Constructed only by the
crate-internal gate acquire, which sets the flag to true via a
CAS; Drop clears it with a Release store so a writer that
releases on one thread is observed by an acquirer that CASes on
another.
At most one WriteSerialGuard exists per env at a time — that is
the single-writer invariant the CAS enforces.
Trait Implementations§
Source§impl Debug for WriteSerialGuard
impl Debug for WriteSerialGuard
Source§impl Drop for WriteSerialGuard
impl Drop for WriteSerialGuard
Auto Trait Implementations§
impl Freeze for WriteSerialGuard
impl RefUnwindSafe for WriteSerialGuard
impl Send for WriteSerialGuard
impl Sync for WriteSerialGuard
impl Unpin for WriteSerialGuard
impl UnsafeUnpin for WriteSerialGuard
impl UnwindSafe for WriteSerialGuard
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