1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00

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 // workers, which is expected, so we should ignore
// it silently and let the first one bubble up, // it silently and let the first one bubble up,
// rethrown via the original state->exception. // rethrown via the original state->exception.
} catch (const ThreadPoolShutDown &) {
// Similarly expected.
} catch (std::exception & e) { } catch (std::exception & e) {
if (!dynamic_cast<ThreadPoolShutDown*>(&e)) ignoreExceptionExceptInterrupt();
ignoreExceptionExceptInterrupt();
} catch (...) { } catch (...) {
} }
} }