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,8 +115,9 @@ 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();
} catch (...) {
}