Helper class that manages an interrupt flag, and allows a thread or signal to interrupt another thread.

Synopsis

Declared in <util/signalinterrupt.h>

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 CThreadInterrupt class can be used instead.

Member Functions

Name

Description

SignalInterrupt [constructor]

Constructs the interrupt in the non‐interrupted state, setting up its signalling channel.

operator()

Requests an interrupt; safe to call from a signal handler.

reset

Resets the interrupt back to the non‐interrupted state.

wait

Blocks until an interrupt is requested.

operator bool

Reports whether an interrupt has been requested.

Created with MrDocs