pub enum RollbackProbe {
Proven,
NotApplicable,
}Expand description
The outcome of OncePtrCell::dbg_rollback_reenterable — exactly the two
answers that probe can give, and no third one it could never produce.
In particular there is no “rollback is broken” variant: the probe cannot distinguish that from “another thread legitimately owns the cell now”, because both make its postcondition CAS fail identically. See the method’s own docs for the full argument.
Variants§
Proven
The rollback provably cleared the sentinel: the probe’s postcondition
CAS re-won the cell afterwards, so no future winner or spinning loser
can be wedged by it. The cell is restored to UNINIT before
returning.
NotApplicable
The probe could not run its check, and this is NOT evidence that
rollback is broken. Either the cell was not UNINIT when the probe
entered (already READY, or owned by another thread at that
instant) — in which case the probe never touched it at all — or a
real get_or_try_init caller re-won the cell during the probe’s own
rollback-then-reCAS window, in which case the probe still does not
touch it, but the cell is no longer necessarily UNINIT: the real
caller may already be running init, or may have published READY,
by the time this returns. Either way the probe never clobbers a
state it does not own.
Trait Implementations§
Source§impl Clone for RollbackProbe
impl Clone for RollbackProbe
Source§fn clone(&self) -> RollbackProbe
fn clone(&self) -> RollbackProbe
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more