mirror of https://github.com/Icinga/icinga2.git
Fix race condition in Process::WorkerThreadProc.
This commit is contained in:
parent
bac7495f49
commit
5a861b0de0
|
@ -119,9 +119,6 @@ void Process::WorkerThreadProc(int taskFd)
|
||||||
|
|
||||||
unsigned int want = MaxTasksPerThread - tasks.size();
|
unsigned int want = MaxTasksPerThread - tasks.size();
|
||||||
|
|
||||||
if (want > m_Tasks.size())
|
|
||||||
want = m_Tasks.size();
|
|
||||||
|
|
||||||
if (want > 0) {
|
if (want > 0) {
|
||||||
boost::mutex::scoped_lock lock(m_Mutex);
|
boost::mutex::scoped_lock lock(m_Mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue