3 ms·
> Rust made the same call. Completely different. In Rust when you spawn a thread [1] or an async task [2], you'll get a handle from which you can check if a pa
by beltsazar 3y ago
> Rust made the same call.
Completely different. In Rust when you spawn a thread [1] or an async task [2], you'll get a handle from which you can check if a panic happens inside the thread/task. Even if you ignore the handle, a panic inside a thread/task won't crash the entire program.
---
[1] https://doc.rust-lang.org/std/thread/fn.spawn.html https://doc.rust-lang.org/std/thread/fn.spawn.html
[2] https://docs.rs/tokio/latest/tokio/task/fn.spawn.html https://docs.rs/tokio/latest/tokio/task/fn.spawn.html
- dinosaurdynasty 3y agoYeah I've been hit by this, I've setup a panic handler to purposefully kill the entire process because otherwise long-running threads die and don't restart (and it was easier to do it that way).