aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-27 15:14:51 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-27 17:29:02 +0000
commitea7f9543817993e22faf94478f07aac746729f73 (patch)
tree82c8f5bbfb13b0dcc83710f8810f8a62e7f1e800
parentgen_multisig: nice exit on unhandled exception (diff)
downloadmonero-ea7f9543817993e22faf94478f07aac746729f73.tar.xz
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
-rw-r--r--src/common/threadpool.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/threadpool.cpp b/src/common/threadpool.cpp
index 6b69e2a12..5ea04a353 100644
--- a/src/common/threadpool.cpp
+++ b/src/common/threadpool.cpp
@@ -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 */ }
}
}