Channel iteration and goroutine leak (opens in new tab)
A for-range over an unclosed channel leaks the receiver. Why three explicit receives are safe, why a range isn't, and catching it with Go 1.27's leak profile.
Read the original articleA for-range over an unclosed channel leaks the receiver. Why three explicit receives are safe, why a range isn't, and catching it with Go 1.27's leak profile.
Read the original article