[go-nuts] Re: Waitgroup problem

2021-01-16 Thread Brian Candler
On Saturday, 16 January 2021 at 16:28:59 UTC Pete Wilson wrote: > In short, what I want to do is to have a controller goroutine (main) plus > some number of worker goroutines > This doesn't answer your question, but if you haven't seen it already I recommend this video about concurrency

[go-nuts] Re: Waitgroup problem

2021-01-16 Thread jake...@gmail.com
There may be other problems as well, but the WaitGroup.Add documentation says: " If a WaitGroup is reused to wait for several independent sets of events, new Add calls must happen after all previous Wait calls have *returned*." You have a race