Skip to main content

stop_on_signal

Function stop_on_signal 

Source
pub fn stop_on_signal() -> Receiver<u32>
Expand description

A count of stop requests (Ctrl-C or SIGTERM): the first stops a role (a worker drains), a second makes a draining worker interrupt its tasks at once. The SIGTERM handler is registered before this returns, so a SIGTERM right after start still stops the role gracefully.