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

Adding an atomic counter is absolutely a great solution in the real world, definitely, and compare and swap or a mutex or similar totally is what you want to do. In fact, that's my point in that part of the post - you want an atomic variable or a mutex or something there. Other synchronization primitives are more useful than sticking with the CSP idea of only using channels for synchronization.


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

Search: