golang
已收录文章:48篇
-
理解 Allow、Wait、Reserve 和 Burst 的区别,给接口加上可解释的限流策略。181 收藏
-
在 database/sql 中使用 QueryContext、ExecContext 和事务 context。175 收藏
-
根据读写频率、临界区大小和语义选择同步工具。173 收藏
-
给非核心依赖设计 fallback,让主流程在部分失败时仍可返回。167 收藏
-
Golang · Go教程 | 6天前 | 并发编程 · 数据竞争 · Go教程 · 生产实践 · race detector · golang Go 数据竞争 并发 sync atomic race detector go test -race从共享计数器和订单状态缓存出发,讲清 Go race detector 的运行方式、报告解读、修复策略、CI 阻断和上线检查。147 收藏
-
Golang · Go教程 | 6天前 | 优雅关闭 · Go教程 · 后端工程 · Golang实战 · net/http · 服务治理 · golang shutdown Go net/http HTTP服务 优雅关闭 SIGTERM 生产实践从一次滚动发布中的半截请求出发,讲清 Go HTTP 服务优雅关闭、signal.NotifyContext、http.Server.Shutdown、超时、连接排空、后台任务收尾和上线检查。135 收藏