Skip to content

Commit

Permalink
Fix MSVS 2013 warning about a condition being always true.
Browse files Browse the repository at this point in the history
Use "for(;;)" for the infinite loop to avoid the warning at /W4 warning level.
  • Loading branch information
vadz committed Jan 8, 2014
1 parent f659749 commit 694dd35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 694dd35

Please sign in to comment.