Lumiera  0.pre.03
»edit your freedom«
subsystem-runner.hpp File Reference

Go to the source code of this file.

Description

Manage execution of the independent Subsystems of the Lumiera application.

The SubsystemRunner is used by lumiera::AppState::init() for actually "performing" the various subsystems, as defined by their Subsystem descriptors. Together these parts define the lifecycle protocol.

Todo:
as of 2018, a design rework seems indicated eventually /////////////////////////TICKET #1177
Remarks
While this facility is still pretty much the first implementation draft from 2008, it fulfilled our needs to express simple dependencies and to conduct a controlled shutdown in case of fatal problems. The operations protocol implied by this implementation might be somewhat brittle and creates strong ties to implementation details, like the fine points of thread handling and locking. If we ever consider to build an improved subsystem runner, we should care to include the full set of lifecycle callbacks, similar to a two phase commit in databases.
See also
SubsystemRunner_test

Definition in file subsystem-runner.hpp.

#include "lib/error.hpp"
#include "lib/util.hpp"
#include "lib/util-foreach.hpp"
#include "lib/format-string.hpp"
#include "common/subsys.hpp"
#include "lib/sync.hpp"
#include <vector>
#include <string>

Classes

class  SubsystemRunner
 Implementation helper for managing execution of a collection of subsystems, which may depend on one another and execute in parallel. More...
 

Variables

const auto EMERGENCY_STOP = 5s
 limited wait period for unwinding of remaining subsystems in case of an emergency shutdown, to avoid deadlock
 

Namespaces

 lumiera
 Lumiera public interface.