diff options
Diffstat (limited to 'src/uscxml/Interpreter.cpp')
-rw-r--r-- | src/uscxml/Interpreter.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index c951999..87eae11 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -232,19 +232,18 @@ bool InterpreterImpl::runOnMainThread(int fps, bool blocking) { _lastRunOnMainThread = tthread::timeStamp(); { - tthread::lock_guard<tthread::recursive_mutex> lock(_ioProcMutex); + tthread::lock_guard<tthread::recursive_mutex> lock(_pluginMutex); std::map<std::string, IOProcessor>::iterator ioProcessorIter = _ioProcessors.begin(); while(ioProcessorIter != _ioProcessors.end()) { ioProcessorIter->second.runOnMainThread(); ioProcessorIter++; } + std::map<std::string, Invoker>::iterator invokerIter = _invokers.begin(); + while(invokerIter != _invokers.end()) { + invokerIter->second.runOnMainThread(); + invokerIter++; + } } - std::map<std::string, Invoker>::iterator invokerIter = _invokers.begin(); - while(invokerIter != _invokers.end()) { - invokerIter->second.runOnMainThread(); - invokerIter++; - } - return (_thread != NULL); } @@ -826,7 +825,7 @@ void InterpreterImpl::invoke(const Arabica::DOM::Node<std::string>& element) { Invoker invoker(Factory::createInvoker(invokeReq.type, this)); if (invoker) { - tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); + tthread::lock_guard<tthread::recursive_mutex> lock(_pluginMutex); try { invoker.setInvokeId(invokeReq.invokeid); invoker.setType(invokeReq.type); @@ -1620,7 +1619,7 @@ bool InterpreterImpl::isCompound(const Arabica::DOM::Node<std::string>& state) { } void InterpreterImpl::setupIOProcessors() { - tthread::lock_guard<tthread::recursive_mutex> lock(_ioProcMutex); + tthread::lock_guard<tthread::recursive_mutex> lock(_pluginMutex); std::map<std::string, IOProcessorImpl*>::iterator ioProcIter = Factory::getInstance()->_ioProcessors.begin(); while(ioProcIter != Factory::getInstance()->_ioProcessors.end()) { if (boost::iequals(ioProcIter->first, "basichttp") && !(_capabilities & CAN_BASIC_HTTP)) { @@ -1665,7 +1664,7 @@ void InterpreterImpl::setupIOProcessors() { } IOProcessor InterpreterImpl::getIOProcessor(const std::string& type) { - tthread::lock_guard<tthread::recursive_mutex> lock(_ioProcMutex); + tthread::lock_guard<tthread::recursive_mutex> lock(_pluginMutex); if (_ioProcessors.find(type) == _ioProcessors.end()) { LOG(ERROR) << "No ioProcessor known for type " << type; return IOProcessor(); |