diff options
Diffstat (limited to '')
| -rw-r--r-- | src/AsyncEventLoop.cpp | 3 |
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); } |
