Skip to main content

Task

Trait Task 

Source
pub trait Task: Send + 'static {
    // Required methods
    fn label(&self) -> &str;
    fn total_iters(&self) -> u64;
    fn workload_per_iter(&mut self);
}
Expand description

§============================================================================== src/task.rs Task trait for workload-driven scientific objects.

A single unit of work executed by the runner.

Implement this on your scientific object. The launcher will call workload_per_iter for each tick and report progress using total_iters.

Required Methods§

Source

fn label(&self) -> &str

Human-readable label for the task.

Source

fn total_iters(&self) -> u64

Total iterations for this task.

Source

fn workload_per_iter(&mut self)

Perform one unit of work.

Implementors§