Handle ThreadPoolShutdown with normal catch

This commit is contained in:
Robert Hensing 2024-10-10 13:08:26 +02:00
parent 3f9ff10786
commit 16320f6d24

View File

@ -115,9 +115,10 @@ void ThreadPool::doWork(bool mainThread)
// workers, which is expected, so we should ignore
// it silently and let the first one bubble up,
// rethrown via the original state->exception.
} catch (const ThreadPoolShutDown &) {
// Similarly expected.
} catch (std::exception & e) {
if (!dynamic_cast<ThreadPoolShutDown*>(&e))
ignoreExceptionExceptInterrupt();
ignoreExceptionExceptInterrupt();
} catch (...) {
}
}