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 88880c2 commit a24ae6cCopy full SHA for a24ae6c
cpputil/hthreadpool.h
@@ -80,7 +80,10 @@ class HThreadPool {
80
81
int stop() {
82
if (status == STOP) return -1;
83
- status = STOP;
+ {
84
+ std::unique_lock<std::mutex> locker(task_mutex);
85
+ status = STOP;
86
+ }
87
task_cond.notify_all();
88
for (auto& i : threads) {
89
if (i.thread->joinable()) {
0 commit comments