pub struct NewsClock { /* private fields */ }Expand description
The arm’s schedule: whether the workspace counts as active, whether
news is waiting for a barrier, and when the last early barrier ran.
Pure: every question takes now.
Implementations§
Source§impl NewsClock
impl NewsClock
Sourcepub fn new(cfg: &LeanConfig, now: Instant) -> NewsClock
pub fn new(cfg: &LeanConfig, now: Instant) -> NewsClock
A syncer starts active: an agent starts work at checkout.
pub fn enabled(&self) -> bool
pub fn active(&self, now: Instant) -> bool
Sourcepub fn taken(&mut self)
pub fn taken(&mut self)
A barrier ran (any arm’s, after the news): its consume read the pointer the news named, or a later one.
pub fn pending(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NewsClock
impl RefUnwindSafe for NewsClock
impl Send for NewsClock
impl Sync for NewsClock
impl Unpin for NewsClock
impl UnsafeUnpin for NewsClock
impl UnwindSafe for NewsClock
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