pub struct OverlayAck {
armed: AtomicU64,
acked: AtomicU64,
}Expand description
Two monotonic counters tracking whether the overlay reported in for the
most recently fired break. armed advances on every fired break; acked
is raised to the latest armed value when the overlay renders. A captured
epoch is “stranded” when it is still the armed break and acked never
caught up to it.
Fields§
§armed: AtomicU64§acked: AtomicU64Implementations§
Source§impl OverlayAck
impl OverlayAck
pub const fn new() -> Self
Sourcepub fn arm(&self) -> u64
pub fn arm(&self) -> u64
Arm a freshly-fired break and return its epoch for a watchdog task to capture. The first armed break is epoch 1 (0 is “never fired”).
Sourcepub fn ack(&self)
pub fn ack(&self)
Record that the overlay rendered the current break — raise acked to
the latest armed epoch. Also used as a defensive disarm on a normal
end_break, so a late watchdog can never tear down an already-ended
break. fetch_max keeps it monotonic under any interleaving.
Sourcepub fn is_stranded(&self, epoch: u64) -> bool
pub fn is_stranded(&self, epoch: u64) -> bool
Whether epoch is still the armed break and no ack has caught up to
it — the overlay never rendered. A newer break (armed > epoch) makes
the captured epoch inert: that break has its own watchdog.
Trait Implementations§
Source§impl Debug for OverlayAck
impl Debug for OverlayAck
Auto Trait Implementations§
impl !Freeze for OverlayAck
impl RefUnwindSafe for OverlayAck
impl Send for OverlayAck
impl Sync for OverlayAck
impl Unpin for OverlayAck
impl UnsafeUnpin for OverlayAck
impl UnwindSafe for OverlayAck
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<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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