mirror of https://github.com/Icinga/icinga2.git
Remove the WorkQueue::m_StatsMutex instance variable
This commit is contained in:
parent
c2fedb3076
commit
e8876f3b22
|
@ -310,15 +310,11 @@ void WorkQueue::WorkerThreadProc()
|
||||||
|
|
||||||
void WorkQueue::IncreaseTaskCount()
|
void WorkQueue::IncreaseTaskCount()
|
||||||
{
|
{
|
||||||
double now = Utility::GetTime();
|
m_TaskStats.InsertValue(Utility::GetTime(), 1);
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(m_StatsMutex);
|
|
||||||
m_TaskStats.InsertValue(now, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t WorkQueue::GetTaskCount(RingBuffer::SizeType span)
|
size_t WorkQueue::GetTaskCount(RingBuffer::SizeType span)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_StatsMutex);
|
|
||||||
return m_TaskStats.UpdateAndGetValues(Utility::GetTime(), span);
|
return m_TaskStats.UpdateAndGetValues(Utility::GetTime(), span);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,6 @@ private:
|
||||||
Timer::Ptr m_StatusTimer;
|
Timer::Ptr m_StatusTimer;
|
||||||
double m_StatusTimerTimeout;
|
double m_StatusTimerTimeout;
|
||||||
|
|
||||||
mutable boost::mutex m_StatsMutex;
|
|
||||||
RingBuffer m_TaskStats;
|
RingBuffer m_TaskStats;
|
||||||
size_t m_PendingTasks{0};
|
size_t m_PendingTasks{0};
|
||||||
double m_PendingTasksTimestamp{0};
|
double m_PendingTasksTimestamp{0};
|
||||||
|
|
Loading…
Reference in New Issue