Avoid use of catch in the destructor

This commit is contained in:
Jean Pierre Cimalando 2020-04-13 19:14:05 +02:00
parent 07b5d7b3d0
commit eda78c4604

View file

@ -106,12 +106,10 @@ sfz::FilePool::~FilePool()
{
quitThread = true;
for (unsigned i = 0; i < threadPool.size(); ++i)
try {
workerBarrier.post();
} catch (std::exception& e) {
continue;
}
for (unsigned i = 0; i < threadPool.size(); ++i) {
std::error_code ec;
workerBarrier.post(ec);
}
for (auto& thread: threadPool)
thread.join();