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

Function main

golang/go-study/go语言基础/并发/goroutine/启动单个goroutine.go:20–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func main() {
21 wg.Add(1) // 登记一个goroutine
22 hello()
23 fmt.Println("你好")
24 wg.Wait() // 阻塞等待登记对goroutine完成
25}

Callers

nothing calls this directly

Calls 3

helloFunction · 0.70
AddMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected