pub struct DependencyTracker { /* private fields */ }Implementations§
Source§impl DependencyTracker
impl DependencyTracker
Sourcepub fn declare_work(&self) -> u64
pub fn declare_work(&self) -> u64
Acquire the next work sequence number. The sequence starts from 0 and increments by 1 each time it is called.
Sourcepub fn mark_this_and_all_previous_work_processed(&self, sequence: u64)
pub fn mark_this_and_all_previous_work_processed(&self, sequence: u64)
Notify all waiting threads that a work has occurred with the given sequence number. This function will update the work sequence and notify all waiting threads only if the work sequence is greater than the work sequence. Notify a work of sequence number ‘s’ will implicitly imply that all work with sequence number less than ‘s’ have been processed.
Sourcepub fn wait_for_dependency(&self, sequence: u64)
pub fn wait_for_dependency(&self, sequence: u64)
To wait for the dependency work with ‘sequence’ to be processed.
Sourcepub fn get_current_declared_work(&self) -> u64
pub fn get_current_declared_work(&self) -> u64
Get the current work sequence number.
Trait Implementations§
Source§impl Debug for DependencyTracker
impl Debug for DependencyTracker
Source§impl Default for DependencyTracker
impl Default for DependencyTracker
Source§fn default() -> DependencyTracker
fn default() -> DependencyTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DependencyTracker
impl RefUnwindSafe for DependencyTracker
impl Send for DependencyTracker
impl Sync for DependencyTracker
impl Unpin for DependencyTracker
impl UnwindSafe for DependencyTracker
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
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