Channel iteration and goroutine leak

A for-range over a channel that's never closed leaks the receiver. Why a fixed number of receives is safe, why a range isn't, and how to catch it with Go 1.27's leak profile.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论