pub trait Pender {
// Required method
fn pend(context: *mut ());
}Expand description
The pender: the callback executors use to notify they have work to do.
There is one global pender for the whole program, registered with the
pender_impl! macro. It is provided by the
platform/architecture implementation, either the built-in ones enabled by the
platform-* Cargo features, or a custom one.
Required Methods§
Sourcefn pend(context: *mut ())
fn pend(context: *mut ())
Called when an executor has work to do.
The implementation must arrange for crate::raw::Executor::poll to be called on the
executor identified by context as soon as possible.
context is the arbitrary data passed to crate::raw::Executor::new by whoever
created the executor. It can be used to differentiate between executors, or to pass a
pointer to a callback that should be called.
This function can be called from any context: any thread, any interrupt priority level, etc. It may be called synchronously from any executor method call as well. The implementation must deal with this correctly.
In particular, the implementation must NOT call poll directly from within this
function, as this violates the requirement for poll to not be called reentrantly.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".