diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
commit | 26183abd9acd44a0382e55cc985795ee7c526aed (patch) | |
tree | a9d9289397b65892dbad037d02460cf2d04597fb /src/uscxml/interpreter/InterpreterDraft6.cpp | |
parent | bd45c688b3d3aad5d62b85457ce943eaadf989ae (diff) | |
download | uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.zip uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.gz uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.bz2 |
Updated W3C tests and bug-fixes
Diffstat (limited to 'src/uscxml/interpreter/InterpreterDraft6.cpp')
-rw-r--r-- | src/uscxml/interpreter/InterpreterDraft6.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp index 881fa8b..e044fcf 100644 --- a/src/uscxml/interpreter/InterpreterDraft6.cpp +++ b/src/uscxml/interpreter/InterpreterDraft6.cpp @@ -9,7 +9,6 @@ using namespace Arabica::DOM; // see: http://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation void InterpreterDraft6::interpret() { -// _mutex.lock(); tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); if (!_isInitialized) init(); @@ -264,7 +263,11 @@ void InterpreterDraft6::mainEventLoop() { while(_externalQueue.isEmpty() && _thread == NULL) { runOnMainThread(200); } + _mutex.lock(); + while(_externalQueue.isEmpty()) { + _condVar.wait(_mutex); + } _currEvent = _externalQueue.pop(); #if VERBOSE std::cout << "Received externalEvent event " << _currEvent.name << std::endl; @@ -273,8 +276,6 @@ void InterpreterDraft6::mainEventLoop() { if (!_running) goto EXIT_INTERPRETER; - _mutex.lock(); - if (_dataModel && boost::iequals(_currEvent.name, "cancel.invoke." + _sessionId)) break; |