Hacker News new | ask | show | jobs
by dx034 895 days ago
I'd disagree with most of that, but the panic in goroutines really hits home. It's so annoying to remember implementing recover in every goroutine started to avoid crashing your application. I don't get why there's no global recover option that can recover from panic's in goroutines as well.
1 comments

Goroutines are expected to communicate on channels. If one goroutine simply vanishes, then its counterparties on any channels will deadlock - either waiting for messages that never come, or trying to send messages to it after channel buffers fill up.

Crash is significantly easier to detect and understand than deadlock.