Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aside from the massive performance penalty, cache thrashing and context switching, this code will also leak a goroutine (and so, memory) if you don't finish receiving from `ch`. It's more brittle, longer to write, less local and in every other way worse than a for loop. Why would you ever do it?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: