aboutsummaryrefslogtreecommitdiff
path: root/src/AsyncEventLoop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AsyncEventLoop.cpp')
-rw-r--r--src/AsyncEventLoop.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/AsyncEventLoop.cpp b/src/AsyncEventLoop.cpp
index 3acbc41..0ee9986 100644
--- a/src/AsyncEventLoop.cpp
+++ b/src/AsyncEventLoop.cpp
@@ -31,6 +31,9 @@ void AsyncEventLoop::process_tasks() {
{
const std::lock_guard<std::mutex> lock(tasks_queue_mutex);
+ if (tasks_queue.empty())
+ return;
+
tasks_queue.swap(tasks);
}