pub trait Executor: Send + Sync + 'static {
fn sleep(&self);
fn wake(&self) { ... }
}
Expand description
Trait for implementing custom executors. Useful when targetting no-std.
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.
The wake routine; should wake the processor or thread. If the hardware
is already waked up automatically, this doesn’t need to be implemented.