pub trait WorkStealingTask: Send + 'static {
type Output: Send + 'static;
// Required method
fn execute(self) -> Self::Output;
// Provided methods
fn estimated_duration(&self) -> Option<Duration> { ... }
fn estimated_memory(&self) -> Option<usize> { ... }
fn can_split(&self) -> bool { ... }
fn split(self) -> Vec<Box<dyn WorkStealingTask<Output = Self::Output>>>
where Self: Sized { ... }
}Expand description
A task that can be executed by the work-stealing scheduler
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn estimated_duration(&self) -> Option<Duration>
fn estimated_duration(&self) -> Option<Duration>
Get the estimated execution time (for load balancing)
Sourcefn estimated_memory(&self) -> Option<usize>
fn estimated_memory(&self) -> Option<usize>
Get the estimated memory usage (for NUMA scheduling)