[go: up one dir, main page]

logo
pub trait Executor: Send + Sync + 'static {
    fn sleep(&self);

    fn wake(&self) { ... }
}
Expand description

Trait for implementing custom executors. Useful when targetting no-std.

Required methods

The sleep routine; should put the processor or thread to sleep in order to save CPU cycles and power, until the hardware tells it to wake up.

Provided methods

The wake routine; should wake the processor or thread. If the hardware is already waked up automatically, this doesn’t need to be implemented.

Implementors