pub trait Notifier: Send + Sync {
// Required methods
fn notify<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Cross-process wake-up channel. The submitter calls notify
after enqueue; the worker awaits wait to short-circuit
its poll interval and pick up new work immediately.
Implementations may coalesce notifications: many notify() calls may
release a single wait(). The worker still re-polls the store on every
wake, so missing a notification is at worst a latency cost, never lost
work.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".