]> granicus.if.org Git - icinga2/commitdiff
ThreadPool#Stop(): discard non-processed queue items 6815/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 3 Dec 2018 15:38:52 +0000 (16:38 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 3 Dec 2018 15:38:52 +0000 (16:38 +0100)
lib/base/threadpool.cpp

index 1dad249bc5b6927b1ca7a00888069ed252c38301..b6b01ea785ac9781fc8b74df031fde0962394285 100644 (file)
@@ -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();
        }