3 ms·
Even with Rust the browser would still need multiple processes because Rust provides no way to catch a panic. The way to handle panics in Rust is to run the cod
by compressedgas 5y ago
Even with Rust the browser would still need multiple processes because Rust provides no way to catch a panic. The way to handle panics in Rust is to run the code in its own process and then to handle the failure of that process.
- steveklabnik 5y agoWe do provide a way to catch a panic https://doc.rust-lang.org/stable/std/panic/fn.catch_unwind.html https://doc.rust-lang.org/stable/std/panic/fn.catch_unwind.h... It's not considered generally idiomatic as an error handling strategy, but it does exist if it's needed.