mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
ab388ce837
commit
7a79886922
@ -51,8 +51,10 @@ void WorkQueue::Enqueue(const WorkCallback& item)
|
||||
|
||||
ASSERT(!m_Stopped);
|
||||
|
||||
while (m_Items.size() >= m_MaxItems)
|
||||
m_CV.wait(lock);
|
||||
if (boost::this_thread::get_id() != GetThreadId()) {
|
||||
while (m_Items.size() >= m_MaxItems)
|
||||
m_CV.wait(lock);
|
||||
}
|
||||
|
||||
m_Items.push_back(item);
|
||||
m_CV.notify_all();
|
||||
|
Loading…
x
Reference in New Issue
Block a user