diff --git a/src/ApplicationModule.cc b/src/ApplicationModule.cc index ed0c4e73990934685ee933cfd3f2615073e6f52e..b13f287ded815c96f8bfccd090dc2e2368986817 100644 --- a/src/ApplicationModule.cc +++ b/src/ApplicationModule.cc @@ -11,16 +11,15 @@ namespace ChimeraTK { void ApplicationModule::run() { - assert(!moduleThread.joinable()); - // read all control system to application variables once, to set the startup value e.g. coming from the config file + // read all input variables once, to set the startup value e.g. coming from the config file // (without triggering an action inside the application) for(auto &variable : getAccessorList()) { - if( variable->getNode().getOwner().getFeedingNode().getType() == NodeType::ControlSystem ) { - variable->readNonBlocking(); - } + if(variable->getDirection() == VariableDirection::consuming) variable->readNonBlocking(); } + // start the module thread + assert(!moduleThread.joinable()); moduleThread = boost::thread(&ApplicationModule::mainLoopWrapper, this); }