Lines Matching full:guard
32 /// SRCU readers may sleep while holding the read-side guard.
35 /// If a read-side guard has been leaked, dropping an [`Srcu`] may never return.
66 /// Leaking the returned [`Guard`] leaves the SRCU read-side critical
69 pub fn read_lock(&self) -> Guard<'_> { in read_lock()
74 Guard { in read_lock()
112 // This should only happen if a guard was leaked with `mem::forget`, which is in drop()
120 // If this ever happens, that means the guard was leaked by mistake and the in drop()
143 /// Guard for an active SRCU read-side critical section on a particular [`Srcu`].
145 /// Leaking this guard with [`core::mem::forget`] leaves the SRCU read-side
152 pub struct Guard<'a> { struct
158 impl Guard<'_> { implementation
164 impl Drop for Guard<'_> { implementation
167 // SAFETY: `Guard` is only constructible through `Srcu::read_lock()`, in drop()