Skip to main content

ShutdownSignal

Type Alias ShutdownSignal 

Source
pub type ShutdownSignal = Shared<Pin<Box<dyn Future<Output = ()> + Send>>>;
Expand description

A shareable future that completes when a shutdown signal is received.

This type is a future that can be cloned and shared between multiple consumers who need to be notified when a shutdown signal is received. When awaited, it will only complete when the process receives a shutdown signal (like Ctrl+C, SIGTERM, etc.).

Aliased Typeยง

pub struct ShutdownSignal { /* private fields */ }