pub struct StopView { /* private fields */ }Expand description
SRD-92 Step 0 — one cooperative-stop view, consulted at every boundary.
Bundles the per-execution stop sources so a boundary check is a single
call, and so a unit that previously held only ONE flag (the while:
wrapper held only the activity stop_flag) observes ALL of them. The
global / per-execution session stop (stop_requested) is always
folded in; a fail-effect global (fault_stop_requested) is folded
into StopView::poll.
The daemon source (the SRD-82 Part 6 daemon-group completion) is a
CLEAN termination: it ends a loop (StopView::stopped) but is NOT a
fault, so it is excluded from StopView::abnormal (the
failure-determining set). Fiber-pool scale-down
([crate::fiber_pool::StopFlag]) is a per-fiber concern, deliberately
NOT part of this view.
Implementations§
Source§impl StopView
impl StopView
Sourcepub fn new(
activity: Option<Arc<AtomicBool>>,
walk: Option<Arc<AtomicBool>>,
daemon: Option<Arc<AtomicBool>>,
) -> Self
pub fn new( activity: Option<Arc<AtomicBool>>, walk: Option<Arc<AtomicBool>>, daemon: Option<Arc<AtomicBool>>, ) -> Self
Build from the per-execution stop sources (any may be absent).
Sourcepub fn stopped(&self) -> bool
pub fn stopped(&self) -> bool
Any cooperative stop — incl. the clean daemon-group completion and the global / per-execution session stop. Use at loop BREAK boundaries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StopView
impl RefUnwindSafe for StopView
impl Send for StopView
impl Sync for StopView
impl Unpin for StopView
impl UnsafeUnpin for StopView
impl UnwindSafe for StopView
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more