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; quitThread = true;
for (unsigned i = 0; i < threadPool.size(); ++i) for (unsigned i = 0; i < threadPool.size(); ++i) {
try { std::error_code ec;
workerBarrier.post(); workerBarrier.post(ec);
} catch (std::exception& e) { }
continue;
}
for (auto& thread: threadPool) for (auto& thread: threadPool)
thread.join(); thread.join();