Hacker News new | ask | show | jobs
by infogulch 239 days ago
Wow how did I not know of this?!

How does it cancel in-progress goroutines when the provided context is cancelled?

1 comments

They have to all use the special context.
They just need to be context aware, or call context-aware things.
Ok so no magic goroutine interruption, just contexts all the way down.

Still, this is nicer than hand-rolling a WG every time.