go 协程之WaitGroup超时控制
摘要:
package main import ( "fmt" "sync" "time" ) // 调用示例 func main() { var w = sync.WaitGroup{} var ch = make(chan bool) w.Add(2) go func() { time.Sleep(ti 阅读全文
posted @ 2022-01-21 15:25 running-fly 阅读(406) 评论(0) 推荐(0) 编辑