From e8876f3b22af2e3ea6ae90517fffd8b5533ae40d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 11 Jan 2018 10:47:55 +0100 Subject: [PATCH] Remove the WorkQueue::m_StatsMutex instance variable --- lib/base/workqueue.cpp | 6 +----- lib/base/workqueue.hpp | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/base/workqueue.cpp b/lib/base/workqueue.cpp index e55eab2ad..ae3dad9b0 100644 --- a/lib/base/workqueue.cpp +++ b/lib/base/workqueue.cpp @@ -310,15 +310,11 @@ void WorkQueue::WorkerThreadProc() void WorkQueue::IncreaseTaskCount() { - double now = Utility::GetTime(); - - boost::mutex::scoped_lock lock(m_StatsMutex); - m_TaskStats.InsertValue(now, 1); + m_TaskStats.InsertValue(Utility::GetTime(), 1); } size_t WorkQueue::GetTaskCount(RingBuffer::SizeType span) { - boost::mutex::scoped_lock lock(m_StatsMutex); return m_TaskStats.UpdateAndGetValues(Utility::GetTime(), span); } diff --git a/lib/base/workqueue.hpp b/lib/base/workqueue.hpp index cdb6c437b..002e5f21c 100644 --- a/lib/base/workqueue.hpp +++ b/lib/base/workqueue.hpp @@ -146,7 +146,6 @@ private: Timer::Ptr m_StatusTimer; double m_StatusTimerTimeout; - mutable boost::mutex m_StatsMutex; RingBuffer m_TaskStats; size_t m_PendingTasks{0}; double m_PendingTasksTimestamp{0};