From 30e6d0f809c47de4204b949263fa209da42e975c Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 3 Dec 2018 16:38:52 +0100 Subject: [PATCH] ThreadPool#Stop(): discard non-processed queue items --- lib/base/threadpool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/base/threadpool.cpp b/lib/base/threadpool.cpp index 1dad249bc..b6b01ea78 100644 --- a/lib/base/threadpool.cpp +++ b/lib/base/threadpool.cpp @@ -73,6 +73,7 @@ void ThreadPool::Stop() for (auto& queue : m_Queues) { boost::mutex::scoped_lock lock(queue.Mutex); queue.Stopped = true; + queue.Items.clear(); queue.CV.notify_all(); } -- 2.40.0