Avoid use of catch in the destructor
This commit is contained in:
parent
07b5d7b3d0
commit
eda78c4604
1 changed files with 4 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue