pub trait ExecutorQueue: Sized {
// Required methods
fn new() -> Self;
fn push(&self, runnable: Runnable);
fn pop(&self) -> Option<Runnable>;
}Expand description
A trait abstracting the async executor queue. The queue MUST be thread-safe (and could be ISR-safe if the executor is used in an embedded context).
Pushing and popping items from the queue must NOT block the current thread / the ISR interrupt.
Allocating memory in the push and pop operations is only allowed if the underlying operating system allows allocations from an ISR context, and if the queue is ISR-safe in the first place.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".