Skip to main content

Notify

Trait Notify 

Source
pub trait Notify:
    Send
    + Sync
    + Debug
    + 'static {
    // Required method
    fn notify(&self) -> Result<()>;
}
Expand description

Wakes a runtime driver, retaining the wakeup if it has not blocked yet.

Internal scheduler notifications retry io::ErrorKind::Interrupted and log and abort the process on any other error or if notify panics, since queued work may otherwise remain stranded. Explicit notifications through Runtime::handle return errors and propagate panics to their caller.

Required Methods§

Source

fn notify(&self) -> Result<()>

Wakes the driver or records a notification for its next wait.

Notifications may be coalesced, but a notification racing with entry into a blocking wait must not be lost. Returns an error if notification fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§