摘要: context使用 Go语言第一形参通常都为context.Context类型,1. 传递上下文 2. 控制子Goroutine超时退出 3. 控制子Goroutine定时退出 package main import ( "context" "fmt" "time" ) func main() { 阅读全文
posted @ 2021-07-19 15:46 牛奔 阅读(248) 评论(0) 推荐(0) 编辑