MCPcopy
hub / github.com/mao888/golang-guide / hello2

Function hello2

golang/go-study/go语言基础/并发/goroutine/启动多个goroutine.go:10–13  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

8var wg2 sync.WaitGroup
9
10func hello2(i int) {
11 defer wg2.Done() // goroutine结束就登记-1
12 fmt.Println("hello", i)
13}
14
15func main() {
16 for i := 0; i < 10; i++ {

Callers 1

mainFunction · 0.85

Calls 1

DoneMethod · 0.80

Tested by

no test coverage detected