mirror of
https://github.com/allankoechke/ThreadPool.git
synced 2026-11-30 09:59:52 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user