A helper class for interruptible sleeps. Calling operator() will interrupt any current sleep, and after that point operator bool() will return true until reset.
Synopsis
Declared in <util/threadinterrupt.h>
class CThreadInterrupt;
Description
This class should not be used in a signal handler. It uses thread synchronization primitives that are not safe to use with signals. If sending an interrupt from a signal handler is necessary, the util::SignalInterrupt class can be used instead.
Type Aliases
Name |
Description |
Clock used to measure sleep durations. |
Member Functions
Name |
Description |
|
Constructs an interrupt in the non‐interrupted state. |
|
Destroys the interrupt. |
|
Reports whether an interrupt has been requested. |
|
Interrupt any sleeps. After this |
|
Reset to an non‐interrupted state. |
|
Sleep for the given duration, returning early if interrupted. |
|
An alias for |
Created with MrDocs