runtime.Goexit 的使用
If you've ever needed to kick off multiple goroutines from func main, you'd have probably noticed that the main goroutine isn't likely to hang around long enough for the other goroutines to finish: 1package main 2 3import ( 4 "fmt" 5 "time" 6) 7 8func main() { 9 go run(1, "A") 10 go run(5, "B") 11} 12 13func run(iter int, name string) { 14