pub enum PanicMode {
Decrement,
Poison,
}
Expand description
What to do if a Barrier
is destroyed during a panic.
Variants§
Decrement
Nothing special.
Just decrement the number of expected threads, just like during any normal destruction.
Poison
Poison the barrier.
All calls to wait
, including the ones that are already in progress, will
panic too. Once poisoned, there’s no way to “unpoison” the barrier.
This is useful in case a failure in one thread makes the whole group unusable (very often in tests).
Trait Implementations§
impl Copy for PanicMode
impl Eq for PanicMode
impl StructuralPartialEq for PanicMode
Auto Trait Implementations§
impl Freeze for PanicMode
impl RefUnwindSafe for PanicMode
impl Send for PanicMode
impl Sync for PanicMode
impl Unpin for PanicMode
impl UnwindSafe for PanicMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)