Remove default WQ limits

refs #10002
This commit is contained in:
Gunnar Beutner 2015-09-02 09:16:20 +02:00 committed by Michael Friedrich
parent c5ef9f9cbc
commit e480af3c7f
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ void WorkQueue::Enqueue(const Task& task, bool allowInterleaved)
}
if (!wq_thread) {
while (m_Tasks.size() >= m_MaxItems)
while (m_Tasks.size() >= m_MaxItems && m_MaxItems != 0)
m_CVFull.wait(lock);
}
@ -198,7 +198,7 @@ void WorkQueue::WorkerThreadProc(void)
if (m_Stopped)
break;
if (m_Tasks.size() >= m_MaxItems)
if (m_Tasks.size() >= m_MaxItems && m_MaxItems != 0)
m_CVFull.notify_all();
Task task = m_Tasks.front();

View File

@ -44,7 +44,7 @@ class I2_BASE_API WorkQueue
public:
typedef boost::function<void (boost::exception_ptr)> ExceptionCallback;
WorkQueue(size_t maxItems = 25000, int threadCount = 1);
WorkQueue(size_t maxItems = 0, int threadCount = 1);
~WorkQueue(void);
void Enqueue(const Task& task, bool allowInterleaved = false);