go-best-practices icon indicating copy to clipboard operation
go-best-practices copied to clipboard

Concurrency Section Improvements

Open GeorgeMac opened this issue 7 years ago • 1 comments

What I think we need to add in order to feel that concurrency is complete for now.

  • [x] supervising goroutines (e.g. tracking them with wait groups or communicating with them via channels)
  • [x] examples of leaky concurrency + architectural solutions to avoid it.
  • [ ] bounded concurrency (using a "pool" of goroutines, rather than fire off any number of them)
  • [ ] testing concurrency + the race detector

Please contribute to this Issue thread so that we can track here the topics we want to talk about.

GeorgeMac avatar Jul 15 '17 17:07 GeorgeMac

Indeed. A hard and fast rule is:

If you use the go keyword, you need to be asking yourself "How will this goroutine terminate? Will it ever? How do I ensure that it has a potential exit case."

brettbuddin avatar Jul 16 '17 00:07 brettbuddin