Skip to main content

signal

Function signal 

Source
pub fn signal() -> AsyncReceiver<Arc<[Signal]>> ⓘ
Expand description

Registers interest in the next batch of signals.

The returned one-shot receiver handles one notification. Call this function again after each notification to continue receiving signals.

Registration is scheduled on the current system’s primary arbiter. Each batch is broadcast to the subscriptions registered when it is dispatched; this is not a replayable signal history. This function does not enable signal handling, and subscriptions in a system that does not own signal handling do not receive process signals.

§Panics

Panics if no system is installed on the current thread.