MCPcopy Create free account
hub / github.com/Swiftie13st/LearningNote / main

Function main

Golang/Code/basicCode/goroutine.go:42–172  ·  view source on GitHub ↗

定义一个协程计数器 var wg sync.WaitGroup func test() { // 这是主进程执行的 for i := 0; i < 1000; i++ { fmt.Println("test1 你好golang", i) //time.Sleep(time.Millisecond * 100) } // 协程计数器减1 wg.Done() } func test2() { // 这是主进程执行的 for i := 0; i < 1000; i++ { fmt.Println("test2 你好golang", i) //time.Sleep(tim

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

putNumFunction · 0.70
primeNumFunction · 0.70
printPrimeFunction · 0.70

Tested by

no test coverage detected