News for hackers. Stuff that matters.
Re:Goroutines and APIs by kimi on Tuesday November 19, 2019 @03:25AM (#21571441)
The problem with goroutines is that an unhandled crash can cause a shutdown, and if the goroutine is started by a badly-written library with no proper recovery, you are dead.
Re:Goroutines and APIs by Thaxll on Tuesday November 19, 2019 @06:11PM (#21579380)
Panic don't shutdown the entire program, only panics on the main goroutine. If your HTTP servers panics it will just kill the goroutine handling the request.
Re:Goroutines and APIs by sagichmal on Tuesday November 19, 2019 @06:56AM (#21572191)
But that's good, right? As a rule, panics should terminate your program.
Re:Goroutines and APIs by kimi on Tuesday November 19, 2019 @07:15AM (#21572268)
Maybe you should choose, or be aware of it. I have seen it happen on network code, that is by definition unreliable.....
Re:Goroutines and APIs by sagichmal on Tuesday November 19, 2019 @08:53AM (#21572779)
Yeah, bad libraries exist :(