Trait timely::scheduling::activate::Scheduler

source ·
pub trait Scheduler {
    // Required methods
    fn activate(&mut self, path: &[usize]);
    fn extensions(&mut self, path: &[usize], dest: &mut Vec<usize>);
}
Expand description

Methods required to act as a timely scheduler.

The core methods are the activation of “paths”, sequences of integers, and the enumeration of active paths by prefix. A scheduler may delay the report of a path indefinitely, but it should report at least one extension for the empty path &[] or risk parking the worker thread without a certain unpark.

There is no known harm to “spurious wake-ups” where a not-active path is returned through extensions().

Required Methods§

source

fn activate(&mut self, path: &[usize])

Mark a path as immediately scheduleable.

source

fn extensions(&mut self, path: &[usize], dest: &mut Vec<usize>)

Populates dest with next identifiers on active extensions of path.

This method is where a scheduler is allowed to exercise some discretion, in that it does not need to present all extensions, but it can instead present only those that the runtime should schedule.

Trait Implementations§

source§

impl Scheduler for Box<dyn Scheduler>

source§

fn activate(&mut self, path: &[usize])

Mark a path as immediately scheduleable.
source§

fn extensions(&mut self, path: &[usize], dest: &mut Vec<usize>)

Populates dest with next identifiers on active extensions of path. Read more

Implementations on Foreign Types§

source§

impl Scheduler for Box<dyn Scheduler>

source§

fn activate(&mut self, path: &[usize])

source§

fn extensions(&mut self, path: &[usize], dest: &mut Vec<usize>)

Implementors§