pub struct AdvancedWorkStealingQueue<T> { /* private fields */ }
Expand description
Advanced work-stealing queue with priority and prediction capabilities
Implementations§
Source§impl<T> AdvancedWorkStealingQueue<T>
impl<T> AdvancedWorkStealingQueue<T>
Sourcepub fn push(
&self,
item: T,
estimatedcost: Duration,
dependencies: Vec<usize>,
) -> usize
pub fn push( &self, item: T, estimatedcost: Duration, dependencies: Vec<usize>, ) -> usize
Add work item with automatic priority classification
Sourcepub fn try_pop(&self) -> Option<PriorityWorkItem<T>>
pub fn try_pop(&self) -> Option<PriorityWorkItem<T>>
Try to pop work item using intelligent scheduling
Sourcepub fn try_steal(&self) -> Option<PriorityWorkItem<T>>
pub fn try_steal(&self) -> Option<PriorityWorkItem<T>>
Attempt to steal work from other queues (for work-stealing)
Sourcepub fn record_completion(&self, task_id: usize, actualduration: Duration)
pub fn record_completion(&self, task_id: usize, actualduration: Duration)
Record task completion for performance prediction
Sourcepub fn get_stats(&self) -> WorkStealingStats
pub fn get_stats(&self) -> WorkStealingStats
Get current queue statistics
Sourcepub fn estimated_remaining_work(&self) -> Duration
pub fn estimated_remaining_work(&self) -> Duration
Get estimated remaining work
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for AdvancedWorkStealingQueue<T>
impl<T> RefUnwindSafe for AdvancedWorkStealingQueue<T>
impl<T> Send for AdvancedWorkStealingQueue<T>where
T: Send,
impl<T> Sync for AdvancedWorkStealingQueue<T>where
T: Send,
impl<T> Unpin for AdvancedWorkStealingQueue<T>where
T: Unpin,
impl<T> UnwindSafe for AdvancedWorkStealingQueue<T>
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> 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