TaskExecutor

Trait TaskExecutor 

Source
pub trait TaskExecutor {
    // Required methods
    fn push(&mut self, task: AnyTask);
    fn poll(&mut self, tasks: &[TaskData]) -> ExecutionPoll;
}
Expand description

A trait that determines task’s execution.

For examples see implementation of the Linear and Parallel executors.

Required Methods§

Source

fn push(&mut self, task: AnyTask)

Push a new task to the executor.

Source

fn poll(&mut self, tasks: &[TaskData]) -> ExecutionPoll

Poll the executor to get it’s state.

  • tasks is a slice of the currently running tasks.

See ExecutionPoll for more information. And executors module for examples.

Implementors§