ParallelTask

Trait ParallelTask 

Source
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§

Source

fn execute(&self) -> ParallelResult

Execute the task

Source

fn estimated_cost(&self) -> f64

Estimate computational cost

Source

fn can_subdivide(&self) -> bool

Check if task can be subdivided

Source

fn subdivide(&self) -> Vec<Box<dyn ParallelTask + Send>>

Subdivide task into smaller tasks

Provided Methods§

Source

fn priority(&self) -> TaskPriority

Get task priority

Source

fn preferred_numa_node(&self) -> Option<usize>

Get preferred NUMA node

Implementors§