Open denmushi opened 1 month ago
Linux
1.20
github.com/bytedance/gopkg v0.0.0-20240202110943-5e26950c5e57
func (c *channel) consume() { for { // ... c.consumer <- it.value // 当外部关闭时,此行有泄漏风险 atomic.AddUint64(&c.consumed, 1) } }
关闭channel时不泄漏
关闭channel时会泄漏
No response
Operating System
Linux
Go Version
1.20
Package Version
github.com/bytedance/gopkg v0.0.0-20240202110943-5e26950c5e57
Affected Packages
Expected Behavior
关闭channel时不泄漏
Actual Behavior
关闭channel时会泄漏
Reproduction Steps
Other Information
No response