You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wondering, for Goal #1 in Readme, the 2nd approach seems to remove the required modification in startTheThing which receives conc.WaitGroup as function parameter, would that make it look simpler for adopting conc lib?
I misunderstood it on the first glance.
1st (original one)
func main() {
var wg conc.WaitGroup
defer wg.Wait()
startTheThing(&wg)
}
func startTheThing(wg *conc.WaitGroup) {
wg.Go(func() { ... })
}
2nd
func main() {
var wg conc.WaitGroup
defer wg.Wait()
func(wg *conc.WaitGroup) {
wg.Go(startTheThing(...))
}(&wg)
}
func startTheThing() {
...
}
The text was updated successfully, but these errors were encountered:
Just wondering, for Goal #1 in Readme, the 2nd approach seems to remove the required modification in
startTheThing
which receivesconc.WaitGroup
as function parameter, would that make it look simpler for adopting conc lib?I misunderstood it on the first glance.
The text was updated successfully, but these errors were encountered: