I don't see any mention about the safety of using WaitGroup from multiple goroutines in godoc. I stumble upon "new Add calls must happen after all previous Wait calls have returned." but given the use case of WaitGroup and the function name I am not quite sure about it.
For example in the last exercise of go tour. I use WaitGroup like this https://play.golang.org/p/096dxnsY98 If I naively interpret the doc I'll guess that I should not call Add during Wait at all. I wonder if this actually safe or not? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.