adapnex::core::Application::CyclicTaskGroupConfig::watchdog_handler

Invoked the first time the execution watchdog trips, after which the task group runs no further cycles. Defaults to reporting the event and terminating the application. A handler that returns decides what happens next. Ignored unless the watchdog is enabled.

Synopsis

Declared in <adapnex/core/application.h>

std::function<void(WatchdogEvent const&)> watchdog_handler = nullptr;

Description

Unlike the methods of Task, the handler may be invoked from a separate thread while a task is still running, and must then be thread‐safe with respect to it. The Context of the task group is not available, so timers cannot be used.

If a custom handler returns, other task groups continue running unless explicitly stopped.

Created with MrDocs