#include <SignalHandlers.h>
Public Types | |
enum class | Type |
Public Member Functions | |
SignalHandler ()=delete | |
nonvirtual void | operator() (SignalID i) const |
A key feature of SignalHandler versus function<void(SignalID)> is that you can compare them (
Note that to do so, you must save the original SignalHandler you create to later remove it by value: creating another SignalHandler (even with the same arguments) may not compare as equal.
Also, signal handlers come with a flag indicating that they are intended to be run in a 'safe' manner or a direct signal handling manner.
Definition at line 71 of file SignalHandlers.h.
|
strong |
A direct (eDirect) signal handler is invoked in the stack context in which the signal is delivered. Direct signal handlers are VERY UNSAFE and use carefully, since they can EASILY produce deadlocks.
A 'safe' (eSafe) signal handler is run in a separate thread context.
Definition at line 84 of file SignalHandlers.h.
|
delete |
Any overload can be used for safe exception handlers, but only the noexcept overload may be used for 'direct' exception calls (as a documentation hint - no real need).
void Stroika::Foundation::Execution::SignalHandler::operator() | ( | SignalID | i | ) | const |
Invoke the actual signal handler.
Definition at line 36 of file SignalHandlers.inl.