diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-17 22:10:57 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-17 22:10:57 (GMT) |
commit | eba3e69a20da96e527827ac83a537cde8bdc66ba (patch) | |
tree | 1af22b6d30c7c9c1f60fdff8e7eb6538754cd5d3 /src/uscxml/Interpreter.h | |
parent | bd394cdb9f78715cf92ddaaef026b6b00d3d2bd9 (diff) | |
download | uscxml-eba3e69a20da96e527827ac83a537cde8bdc66ba.zip uscxml-eba3e69a20da96e527827ac83a537cde8bdc66ba.tar.gz uscxml-eba3e69a20da96e527827ac83a537cde8bdc66ba.tar.bz2 |
Protect parts of interpreter with mutexes for thread-safety
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r-- | src/uscxml/Interpreter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index f28eb69..1075a1c 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -142,10 +142,12 @@ public: void receive(const Event& event, bool toFront = false); Event getCurrentEvent() { + tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); return _currEvent; } Arabica::XPath::NodeSet<std::string> getConfiguration() { + tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); return _configuration; } void setConfiguration(const std::vector<std::string>& states) { |