LogCabin
|
Blocks asynchronous signal delivery on the current thread for the given signal. More...
#include <Signal.h>
Public Member Functions | |
Blocker (int signalNumber) | |
Constructor. | |
~Blocker () | |
Destructor. | |
void | block () |
Blocks further signals if they are not already blocked. | |
void | leaveBlocked () |
Leave the signal blocked when this object is destroyed. | |
void | unblock () |
Unblocks signals if they are blocked. | |
Public Attributes | |
const int | signalNumber |
Private Attributes | |
bool | isBlocked |
Set to true if the signal is currently blocked. | |
bool | shouldLeaveBlocked |
Set to true if the signal should be left unblocked on destruction. |
Blocks asynchronous signal delivery on the current thread for the given signal.
This should normally be called before any secondary threads are started, so that all subsequent threads also have the signal blocked.
LogCabin::Event::Signal::Blocker::Blocker | ( | int | signalNumber | ) | [explicit] |
Unblocks signals if they are blocked.
Also clears shouldLeaveBlocked.
bool LogCabin::Event::Signal::Blocker::isBlocked [private] |
bool LogCabin::Event::Signal::Blocker::shouldLeaveBlocked [private] |