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

Wow, that's not intuitive. :)

Throwing in a "defer close(ch)" and that range thing did exactly the right thing. I'm not sure my API is right, but I know how to get it right now. Thanks a lot.



I'm surprised you say it's not intuitive. What is it just that you didn't know you could close channels?


The idea of using "range" across what should generally be an infinite channel is not something I would've guessed existed.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: