[#util-SignalInterrupt] = xref:util.adoc[util]::SignalInterrupt :relfileprefix: ../ :mrdocs: Helper class that manages an interrupt flag, and allows a thread or signal to interrupt another thread. == Synopsis Declared in `<util/signalinterrupt.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class SignalInterrupt; ---- == Description This class is safe to be used in a signal handler. If sending an interrupt from a signal handler is not necessary, the more lightweight xref:CThreadInterrupt.adoc[`CThreadInterrupt`] class can be used instead. == Member Functions [cols="1,4"] |=== | Name| Description | xref:util/SignalInterrupt/2constructor.adoc[`SignalInterrupt`] [.small]#[constructor]# | Constructs the interrupt in the non‐interrupted state, setting up its signalling channel. | xref:util/SignalInterrupt/operator_call.adoc[`operator()`] | Requests an interrupt; safe to call from a signal handler. | xref:util/SignalInterrupt/reset.adoc[`reset`] | Resets the interrupt back to the non‐interrupted state. | xref:util/SignalInterrupt/wait.adoc[`wait`] | Blocks until an interrupt is requested. | xref:util/SignalInterrupt/2conversion.adoc[`operator bool`] | Reports whether an interrupt has been requested. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#