Struct graceful::SignalGuard [] [src]

pub struct SignalGuard(_);

Methods

impl SignalGuard
[src]

Block necessary signals (SIGINT, SIGQUIT and SIGTERM on *nix, Ctrl+C and Ctrl+Break on Windows).

New threads should be spawned after this.

Block the running thread until a signal is received. Then the handler will be called in the main thread.

Do not put any code after this.