Skip to main content

Scheduler

Trait Scheduler 

Source
pub trait Scheduler: Args {
    // Provided methods
    fn settings(&self, _params: &mut Params<'_>) -> Result<()> { ... }
    fn runtime(&self) -> u64 { ... }
    fn capacity(&self) -> Capacity { ... }
    fn stats(&self) -> Option<Stats> { ... }
    fn attached(&self, attached: &Attached<'_>) { ... }
    fn stopped(&self, name: &str, why: &str) { ... }
}
Expand description

What a scheduler adds to the loader, on its options. Every method has a default, so impl Scheduler for Opts {} is a scheduler with nothing but the tunables its options name.

Provided Methods§

Source

fn settings(&self, _params: &mut Params<'_>) -> Result<()>

Set the tunables no option sets by its name, see main!.

Source

fn runtime(&self) -> u64

What the scheduler asks of the runtime, a mask of config::runtime’s bits.

Source

fn capacity(&self) -> Capacity

How the CPUs’ capacities and packing ranks are read.

Source

fn stats(&self) -> Option<Stats>

The scheduler’s statistics, for --stats and --monitor. None: it has no statistics.

Source

fn attached(&self, attached: &Attached<'_>)

Called once the scheduler is attached and its init has run, with what the loader knows about the run, for the scheduler to report as it likes.

Source

fn stopped(&self, name: &str, why: &str)

Called when the scheduler was unregistered without an error, why being the reason, and the message if any. An error exit is reported by the loader, with the kernel’s debug dump.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§