gf/geg/os/grpool/grpool3.go
2018-01-17 15:18:52 +08:00

19 lines
244 B
Go

package main
import (
"fmt"
"sync"
)
func main() {
wg := sync.WaitGroup{}
for i := 0; i < 10; i++ {
wg.Add(1)
go func(v int){
fmt.Println(v)
wg.Done()
}(i)
}
wg.Wait()
}