summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter/InterpreterDraft6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/interpreter/InterpreterDraft6.cpp')
-rw-r--r--src/uscxml/interpreter/InterpreterDraft6.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp
index f73051e..a15e9a4 100644
--- a/src/uscxml/interpreter/InterpreterDraft6.cpp
+++ b/src/uscxml/interpreter/InterpreterDraft6.cpp
@@ -101,6 +101,7 @@ void InterpreterDraft6::interpret() {
assert(initialTransitions.size() > 0);
enterStates(initialTransitions);
+ _mutex.unlock();
// assert(hasLegalConfiguration());
mainEventLoop();
@@ -136,7 +137,6 @@ void InterpreterDraft6::mainEventLoop() {
}
std::cout << std::endl;
#endif
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -148,7 +148,6 @@ void InterpreterDraft6::mainEventLoop() {
}
monIter++;
}
- _mutex.lock();
enabledTransitions = selectEventlessTransitions();
if (enabledTransitions.size() == 0) {
@@ -166,7 +165,6 @@ void InterpreterDraft6::mainEventLoop() {
}
}
if (!enabledTransitions.empty()) {
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -178,8 +176,6 @@ void InterpreterDraft6::mainEventLoop() {
}
monIter++;
}
- _mutex.lock();
-
// test 403b
enabledTransitions.to_document_order();
microstep(enabledTransitions);
@@ -200,8 +196,6 @@ void InterpreterDraft6::mainEventLoop() {
// assume that we have a legal configuration as soon as the internal queue is empty
assert(hasLegalConfiguration());
- _mutex.unlock();
-
monIter = _monitors.begin();
// if (!_sendQueue || _sendQueue->isEmpty()) {
while(monIter != _monitors.end()) {
@@ -229,8 +223,6 @@ void InterpreterDraft6::mainEventLoop() {
if (!_running)
goto EXIT_INTERPRETER;
- _mutex.lock();
-
if (_dataModel && boost::iequals(_currEvent.name, "cancel.invoke." + _sessionId))
break;
@@ -652,7 +644,6 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e
std::cout << std::endl;
#endif
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -664,7 +655,6 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e
}
monIter++;
}
- _mutex.lock();
for (int i = 0; i < statesToExit.size(); i++) {
NodeSet<std::string> histories = filterChildElements(_xmlNSPrefix + "history", statesToExit[i]);
@@ -715,7 +705,6 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e
_configuration.insert(_configuration.end(), tmp.begin(), tmp.end());
}
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -727,7 +716,6 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e
}
monIter++;
}
- _mutex.lock();
}
@@ -834,7 +822,6 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>&
}
statesToEnter.to_document_order();
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -846,7 +833,6 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>&
}
monIter++;
}
- _mutex.lock();
for (int i = 0; i < statesToEnter.size(); i++) {
Element<std::string> stateElem = (Element<std::string>)statesToEnter[i];
@@ -904,7 +890,6 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>&
}
}
- _mutex.unlock();
monIter = _monitors.begin();
while(monIter != _monitors.end()) {
try {
@@ -916,7 +901,6 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>&
}
monIter++;
}
- _mutex.lock();
}