summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/SimpleEventLoop.cpp')
-rw-r--r--Swiften/EventLoop/SimpleEventLoop.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/EventLoop/SimpleEventLoop.cpp b/Swiften/EventLoop/SimpleEventLoop.cpp
index d745e39..2d71544 100644
--- a/Swiften/EventLoop/SimpleEventLoop.cpp
+++ b/Swiften/EventLoop/SimpleEventLoop.cpp
@@ -25,7 +25,7 @@ SimpleEventLoop::~SimpleEventLoop() {
}
}
-void SimpleEventLoop::run() {
+void SimpleEventLoop::doRun(bool breakAfterEvents) {
while (isRunning_) {
std::vector<Event> events;
{
@@ -38,6 +38,9 @@ void SimpleEventLoop::run() {
foreach(const Event& event, events) {
handleEvent(event);
}
+ if (breakAfterEvents) {
+ return;
+ }
}
}