We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2ac0d7 commit ee1f6e9Copy full SHA for ee1f6e9
ThreadPool.hpp
@@ -59,8 +59,8 @@ class ThreadPool {
59
60
{
61
std::unique_lock<std::mutex> lock(this->queue_mutex);
62
- this->condition.wait(lock,
63
- [this]{ return this->stop || !this->tasks.empty(); });
+ if(!this->stop && this->tasks.empty())
+ this->condition.wait(lock);
64
if(this->stop && this->tasks.empty())
65
return;
66
task = std::move(this->tasks.front());
0 commit comments