(no title)
billjings | 1 year ago
Notes On Structured Concurrency goes into some depth on this comparison:
https://vorpus.org/blog/notes-on-structured-concurrency-or-g...
If channel sends are being used as invocations, then this description can apply just as well to channels as it does to the go statement.
throwaway894345|1 year ago
Yeah, this is why we use `sync.WaitGroup`s and similar abstractions in Go. Using bare channels (like using `goto`) is fine for small local things, but if you're building abstractions you should use patterns like those discussed in the article (for example: https://go.dev/play/p/UoB8ECDbaTw --I'm sure this can be abstracted further).