3 ms·
> Panics in rust threads do not crash the process. They do on several occasions, as I mentioned in the post: > the process still crashes if the target doesn’t
by Expurple 2y ago
> Panics in rust threads do not crash the process.
They do on several occasions, as I mentioned in the post:
> the process still crashes if the target doesn’t support unwinding or the project is built with panic = "abort" setting.
The linked guide to error handling in Rust [1] mentions another such case:
> Even in the default unwind-on-panic configuration, causing a panic while the thread is already panicking will cause the whole program to abort. You must therefore be very careful that destructors cannot panic under any circumstance. You can check if the current thread is panicking by using the std::thread::panicking function.
[1] https://nrc.github.io/error-docs/rust-errors/panic.html#panic https://nrc.github.io/error-docs/rust-errors/panic.html#pani...