pub trait ParallelTask: Send {
// Required methods
fn execute(&self) -> ParallelResult;
fn estimated_cost(&self) -> f64;
fn can_subdivide(&self) -> bool;
fn subdivide(&self) -> Vec<Box<dyn ParallelTask + Send>>;
// Provided methods
fn priority(&self) -> TaskPriority { ... }
fn preferred_numa_node(&self) -> Option<usize> { ... }
}Expand description
Trait for parallel tasks
Required Methods§
Sourcefn execute(&self) -> ParallelResult
fn execute(&self) -> ParallelResult
Execute the task
Sourcefn estimated_cost(&self) -> f64
fn estimated_cost(&self) -> f64
Estimate computational cost
Sourcefn can_subdivide(&self) -> bool
fn can_subdivide(&self) -> bool
Check if task can be subdivided
Provided Methods§
Sourcefn priority(&self) -> TaskPriority
fn priority(&self) -> TaskPriority
Get task priority
Sourcefn preferred_numa_node(&self) -> Option<usize>
fn preferred_numa_node(&self) -> Option<usize>
Get preferred NUMA node