Currently if a worker thread (i.e. a compiler thread) panics, an error is printed to the terminal, but the main process charges on as if nothing happened. This makes it very easy for errors to be missed.
This commit makes MT, when it is closing down, check whether worker threads have panicked or not.
In one way this works fine, but it's also made it clear to me that relying on drop with an Arc is not a great solution here: we clone MT in various cases, so worker threads can stop drop ever being called in certain cases. Fixing that is a job for another day: this commit does work in enough cases already to be useful.
Currently if a worker thread (i.e. a compiler thread) panics, an error is printed to the terminal, but the main process charges on as if nothing happened. This makes it very easy for errors to be missed.
This commit makes
MT
, when it is closing down, check whether worker threads have panicked or not.In one way this works fine, but it's also made it clear to me that relying on
drop
with anArc
is not a great solution here: we cloneMT
in various cases, so worker threads can stopdrop
ever being called in certain cases. Fixing that is a job for another day: this commit does work in enough cases already to be useful.