threadpool: do not propagate exceptions through the dtor

This would call terminate.
We ignore exceptions in pthread_join instead, as this is not
a fatal problem here.

Coverity 182568
This commit is contained in:
moneromooo-monero 2018-09-27 15:14:51 +00:00
parent 6e8554221f
commit ea7f954381
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -57,7 +57,8 @@ threadpool::~threadpool() {
has_work.notify_all();
}
for (size_t i = 0; i<threads.size(); i++) {
threads[i].join();
try { threads[i].join(); }
catch (...) { /* ignore */ }
}
}