Bitcoin Core 28.99.0
P2P Digital Currency
|
Helper class that manages an interrupt flag, and allows a thread or signal to interrupt another thread. More...
#include <signalinterrupt.h>
Public Member Functions | |
SignalInterrupt () | |
operator bool () const | |
bool | operator() () |
bool | reset () |
bool | wait () |
Private Attributes | |
std::atomic< bool > | m_flag |
TokenPipeEnd | m_pipe_r |
TokenPipeEnd | m_pipe_w |
Helper class that manages an interrupt flag, and allows a thread or signal to interrupt another thread.
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.
Definition at line 28 of file signalinterrupt.h.
util::SignalInterrupt::SignalInterrupt | ( | ) |
|
explicit |
Definition at line 28 of file signalinterrupt.cpp.
bool util::SignalInterrupt::operator() | ( | ) |
bool util::SignalInterrupt::reset | ( | ) |
bool util::SignalInterrupt::wait | ( | ) |
Definition at line 63 of file signalinterrupt.cpp.
|
private |
Definition at line 38 of file signalinterrupt.h.
|
private |
Definition at line 42 of file signalinterrupt.h.
|
private |
Definition at line 43 of file signalinterrupt.h.