📜  golang waitgroup - Go 编程语言 - Go 编程语言代码示例
📅  最后修改于: 2022-03-11 14:44:59.067000             🧑  作者: Mango
代码示例2
var wg sync.WaitGroup
for i := 1; i <= 5; i++ {
wg.Add(1)
go func(wg *sync.WaitGroup) {
wg.Done()
}()
}
wg.Wait()