1
0
mirror of synced 2025-04-19 00:24:02 +03:00

avoid lockup in ThreadPool::shutdown() on legacy host (#1417)

It is found on CentOS 7.0.1406 which is very early version of CentOS 7.

Co-authored-by: Changbin Park <changbin.park@ahnlab.com>
This commit is contained in:
Changbin Park 2022-11-03 23:23:45 +09:00 committed by GitHub
parent 27cd4e6ffe
commit ad7edc7b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -560,10 +560,9 @@ public:
{ {
std::unique_lock<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_);
shutdown_ = true; shutdown_ = true;
cond_.notify_all();
} }
cond_.notify_all();
// Join... // Join...
for (auto &t : threads_) { for (auto &t : threads_) {
t.join(); t.join();