01Go-engineeringOct 26, 2026

并发编程规范:goroutine、channel 与 sync 的纪律

goroutine 的创建成本低:一个 go 语句即可启动,初始栈仅需几 KB。但创建成本低意味着终止必须显式设计——每个 goroutine 都是需要被负责回收的资源。多数并发故障并非源于高深特性,而是几类基础疏漏:goroutine 未定义退出机制、接收方关闭 channel、select 遗漏取消信号、WaitGroup.Add 的调用位置错误。

10 min read

Quote of the day · November 15关于接受Breaking Bad

You got the job. Do yourself a favor and learn to take yes for an answer.