Skip to main content

bind_shutdown_signals

Function bind_shutdown_signals 

Source
pub fn bind_shutdown_signals(token: CancellationToken)
Expand description

Spawn a task that cancels token on SIGINT (and on Unix, SIGTERM). Returns immediately; the spawned task lives until either signal fires or the runtime shuts down.