摘要: // Check if the context is expired. select { default: case <-ctx.Done(): db.mu.Unlock() return nil, ctx.Err() } Go\src\database\sql\sql.go 阅读全文
posted @ 2022-09-08 18:00 papering 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 问题:GRPC应用中是否必要建立连接池 实践: import ( "LabGO/utils" "fmt" "runtime" "sync" "time" "google.golang.org/grpc" "google.golang.org/grpc/encoding/gzip" ) var Con 阅读全文
posted @ 2022-09-08 17:11 papering 阅读(67) 评论(0) 推荐(0) 编辑