Fix MSVS 2013 warning about a condition being always true.

Use "for(;;)" for the infinite loop to avoid the warning at /W4 warning level.
This commit is contained in:
Vadim Zeitlin
2014-01-08 17:14:12 +01:00
parent f659749e40
commit 694dd35461

View File

@@ -38,7 +38,7 @@ inline ThreadPool::ThreadPool(size_t threads)
workers.emplace_back(
[this]
{
while(true)
for(;;)
{
std::unique_lock<std::mutex> lock(this->queue_mutex);
while(!this->stop && this->tasks.empty())