News for hackers. Stuff that matters.
Re:Fourteen Years of Go by masklinn on Saturday November 11, 2023 @07:56AM (#38229908)
> Rust made the same call.

It did not though?

- threads implicitly catch_panic at their boundary, and convert that to a `Result` which you can receive when you join on the thread: https://doc.rust-lang.org/std/thread/type.Result.html

- in theory an async runtime could shut down on panic, but tokio at least does not, much like `std::thread::spawn` it'll catch_panic and return a JoinError to however is await-ing the joinhandle: https://docs.rs/tokio/latest/tokio/task/struct.JoinError.htm...

If you drop the handles, the error just is not signaled:

- sync: https://play.rust-lang.org/?version=stable&mode=debug&editio...

- async (tokio): https://play.rust-lang.org/?version=stable&mode=debug&editio...

Re:Fourteen Years of Go by galangalalgol on Saturday November 11, 2023 @09:57AM (#38230825)
Yeah I think I remember that being a controversial decision when it was made for threads? One of the valid reasons for a panic is that you've encountered something that makes you think your adress space is in a bad state. Threads share an address space, so the reasoning was that if they panic, so should the process, but that isn't what happened.