Struct rayon_core::latch::OnceLatch
source · pub(crate) struct OnceLatch {
core_latch: CoreLatch,
}
Expand description
Once latches are used to implement one-time blocking, primarily for the termination flag of the threads in the pool.
Note: like a SpinLatch
, once-latches are always associated with
some registry that is probing them, which must be tickled when
they are set. Unlike a SpinLatch
, they don’t themselves hold a
reference to that registry. This is because in some cases the
registry owns the once-latch, and that would create a cycle. So a
OnceLatch
must be given a reference to its owning registry when
it is set. For this reason, it does not implement the Latch
trait (but it doesn’t have to, as it is not used in those generic
contexts).
Fields§
§core_latch: CoreLatch
Implementations§
Trait Implementations§
source§impl AsCoreLatch for OnceLatch
impl AsCoreLatch for OnceLatch
fn as_core_latch(&self) -> &CoreLatch
Auto Trait Implementations§
impl !Freeze for OnceLatch
impl RefUnwindSafe for OnceLatch
impl Send for OnceLatch
impl Sync for OnceLatch
impl Unpin for OnceLatch
impl UnwindSafe for OnceLatch
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