29 #ifndef TOMOGRAPHER_TOOLS_SIGNAL_STATUS_REPORT 30 #define TOMOGRAPHER_TOOLS_SIGNAL_STATUS_REPORT 52 template<
typename TaskDispatcher,
typename Logger>
60 : tasks(tasks_), logger(logger_)
62 tasks->setStatusReportHandler(
63 [
this](
const FullStatusReportType& report) {
64 logger.debug(
"SigHandlerStatusReporter/lambda",
"intermediate progress report lambda called");
69 TaskDispatcher * tasks;
72 virtual void handleSignal(
int )
74 tasks->requestStatusReport();
83 fprintf(stderr,
"\n%s\n", human_report.
c_str());
88 template<
typename TaskDispatcher,
typename LoggerT>
90 makeSigHandlerTaskDispatcherStatusReporter(TaskDispatcher * tasks, LoggerT & logger)
Base namespace for the Tomographer project.
Some common definitions for multiprocessing interfaces.
std::string getHumanReport() const
Produce a text-based human-readable short representation of the status report.
Basic common code for intercepting a signal and basic interfacing to C++.
A complete status report, abstract version.