Class handling signals.
More...
#include <SignalsHandler.hpp>
|
enum class | Priority { StopFirst = 0
, Normal = 1
, StopLast = 2
} |
| Enum for stop priority.
|
|
|
static constexpr auto | kHANDLED_SIGNALS = {SIGINT, SIGTERM} |
|
|
class | impl::SignalsHandlerStatic |
|
Class handling signals.
- Note
- There could be only one instance of this class.
◆ SignalsHandler()
Create SignalsHandler object.
- Parameters
-
config | The configuration. |
forceExitHandler | The handler for forced exit. |
◆ subscribeToStop()
template<std::invocable SomeCallback>
void util::SignalsHandler::subscribeToStop |
( |
SomeCallback && | callback, |
|
|
Priority | priority = Priority::Normal ) |
|
inline |
Subscribe to stop signal.
- Template Parameters
-
SomeCallback | The type of the callback. |
- Parameters
-
callback | The callback to call on stop signal. |
priority | The priority of the callback. Default is Normal. |
The documentation for this class was generated from the following files: