diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-06-16 14:51:27 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-06-16 14:51:27 (GMT) |
commit | fa6b4f074d4be04d913d8b7dc062920341c34ecb (patch) | |
tree | 83ae475b184a3b1bccca2a69addcefb6c12d924e /src/uscxml/interpreter/BasicEventQueue.cpp | |
parent | ed6aee05e2843be65c4ab445d79e70dc8dacc07b (diff) | |
download | uscxml-fa6b4f074d4be04d913d8b7dc062920341c34ecb.zip uscxml-fa6b4f074d4be04d913d8b7dc062920341c34ecb.tar.gz uscxml-fa6b4f074d4be04d913d8b7dc062920341c34ecb.tar.bz2 |
Fixed issue86 and some more bug fixes
Diffstat (limited to 'src/uscxml/interpreter/BasicEventQueue.cpp')
-rw-r--r-- | src/uscxml/interpreter/BasicEventQueue.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp index d484ada..7505f46 100644 --- a/src/uscxml/interpreter/BasicEventQueue.cpp +++ b/src/uscxml/interpreter/BasicEventQueue.cpp @@ -74,6 +74,11 @@ void BasicEventQueue::enqueue(const Event& event) { _cond.notify_all(); } +void BasicEventQueue::reset() { + std::lock_guard<std::recursive_mutex> lock(_mutex); + _queue.clear(); +} + static void dummyCallback(evutil_socket_t fd, short what, void *arg) { timeval tv; tv.tv_sec = 365 * 24 * 3600; @@ -206,4 +211,10 @@ void BasicDelayedEventQueue::stop() { } } +void BasicDelayedEventQueue::reset() { + std::lock_guard<std::recursive_mutex> lock(_mutex); + cancelAllDelayed(); + _queue.clear(); +} + }
\ No newline at end of file |