From 201cb2b1fac77c542a20aea2ac1d80c78a3d80e9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 1 Jun 2020 21:44:59 +0200 Subject: Fix program stuck on shutdown --- src/plugins/Fourchan.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp index d8c80b0..1dfe681 100644 --- a/src/plugins/Fourchan.cpp +++ b/src/plugins/Fourchan.cpp @@ -37,8 +37,10 @@ namespace QuickMedia { Fourchan::~Fourchan() { running = false; - std::unique_lock lock(thread_list_cache_mutex); - thread_list_update_cv.notify_one(); + { + std::unique_lock lock(thread_list_cache_mutex); + thread_list_update_cv.notify_one(); + } thread_list_update_thread.join(); } -- cgit v1.2.3