5 ms·
Right but in Erlang when individual components (processes) "panic", the whole beam VM doesn't crash.
by LAC-Tech 2y ago
Right but in Erlang when individual components (processes) "panic", the whole beam VM doesn't crash.
- John23832 2y agoThat difference is bigger than the language though. The BEAM runtime protects handles process lifetimes.
- bryanlarsen 2y agoPanics in rust threads do not crash the process. Only panics in the main thread crash the process. So if you run nothing in the main thread, you can take advantage of this.
- LAC-Tech 2y agoI didn't know that.
- 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...