Skip to main content

is_user_interrupt_requested

Function is_user_interrupt_requested 

Source
pub fn is_user_interrupt_requested() -> bool
Expand description

Check if a user interrupt request is pending without consuming it.

Returns true if an interrupt is pending. The flag remains set so that the event loop can still consume it via take_user_interrupt_request().

Use this when you need to react to an interrupt (e.g., kill a subprocess) without stealing the flag from the event loop’s per-iteration check.