Skip to content

Commit

Permalink
Merge pull request #6 from topin89/patch-1
Browse files Browse the repository at this point in the history
[Bugfix] queue_size never increased
  • Loading branch information
Loic Reyreaud committed Jan 10, 2020
2 parents 06e635d + b4db5d0 commit 64ec9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/threadpool.hpp
Expand Up @@ -360,7 +360,7 @@ inline void ThreadPool::dispatch_work(const std::size_t idx, TaskType task)
std::lock_guard<decltype(Worker::tasks_lock)> lk(worker.second->tasks_lock);
worker.second->tasks.emplace(std::move(task));
}
worker.second->queue_size--;
worker.second->queue_size++;
worker.second->cv_variable.notify_one();
}

Expand Down

0 comments on commit 64ec9ad

Please sign in to comment.