Skip to main content

ctrl_c

Function ctrl_c 

Source
pub async fn ctrl_c()
Expand description

Returns a future that completes when Ctrl+C is received.

This is a thin wrapper around tokio::signal::ctrl_c() that panics on error.

§Example

send_message_on(handle.clone(), rt::ctrl_c(), Msg::Shutdown);