News for hackers. Stuff that matters.
Re:Error handling with errgroups by tptacek on Friday October 29, 2021 @04:32PM (#29043238)
You get a request. To handle it, you fork off a bunch of goroutines, some of them doing lots of heavy lifting. Some trivial part of the request handler fails. You report the error back to the requestor, aborting the request. But you still have all these goroutines wandering around doing pointless work for a now-dead request.

Contexts are how you address that.

There are no comments on this comment yet.