diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-23 10:50:59 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-23 10:50:59 (GMT) |
commit | 9f3dfcd9982cff90cf0466413d17fc1061c43f00 (patch) | |
tree | e29d0f70ecdfb742e3bbbc522e87281c8bbd58e7 /src/uscxml/interpreter | |
parent | 216e8efb0f1aff9afd3881ab89b49e017e255228 (diff) | |
download | uscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.zip uscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.tar.gz uscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.tar.bz2 |
Fixed the 100% CPU utilization bug and replaced the bool() cast operator for data by empty()
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r-- | src/uscxml/interpreter/InterpreterDraft6.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp index 8be2634..12d6123 100644 --- a/src/uscxml/interpreter/InterpreterDraft6.cpp +++ b/src/uscxml/interpreter/InterpreterDraft6.cpp @@ -121,7 +121,8 @@ NodeSet<std::string> InterpreterDraft6::getDocumentInitialTransitions() { // a macrostep InterpreterState InterpreterDraft6::step(bool blocking) { try { - + tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); + monIter_t monIter; NodeSet<std::string> enabledTransitions; @@ -147,6 +148,7 @@ InterpreterState InterpreterDraft6::step(bool blocking) { // read an external event and react if (blocking) { + // wait until an event becomes available while(_externalQueue.isEmpty()) { _condVar.wait(_mutex); |