pub struct EpochTracker { /* private fields */ }Expand description
The coordinator’s book: which tasks reported which epoch, which tasks finished. Epochs
complete in order. An epoch completes when every expected task has reported it (or finished
before it) — for a single-process run that is every task 0..n; for one worker of a multi-
process run it is only the tasks placed on this worker (the leader aggregates across workers).
Implementations§
Source§impl EpochTracker
impl EpochTracker
Sourcepub fn new(n_tasks: usize) -> EpochTracker
pub fn new(n_tasks: usize) -> EpochTracker
A tracker for a contiguous task set 0..n_tasks (the single-process run).
Sourcepub fn new_for(expected: Vec<u32>) -> EpochTracker
pub fn new_for(expected: Vec<u32>) -> EpochTracker
A tracker for an explicit set of task ids (one worker’s own tasks).
Sourcepub fn on_event(&mut self, e: &Event) -> Vec<Completed>
pub fn on_event(&mut self, e: &Event) -> Vec<Completed>
Book one event; returns the epochs it completed, in order.
pub fn all_finished(&self) -> bool
pub fn finished(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EpochTracker
impl RefUnwindSafe for EpochTracker
impl Send for EpochTracker
impl Sync for EpochTracker
impl Unpin for EpochTracker
impl UnsafeUnpin for EpochTracker
impl UnwindSafe for EpochTracker
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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