📅  最后修改于: 2022-03-11 14:44:59.147000             🧑  作者: Mango
wg := sync.WaitGroup{}
wg.Add(1000)
for i := 1; i <= 1000; i++ {
go func(j int) {
f(j)
wg.Done()
}(i)
}
wg.Wait()