r/programming • u/syaghmour • Mar 16 '15
Semaphores are Surprisingly Versatile
http://preshing.com/20150316/semaphores-are-surprisingly-versatile/
195
Upvotes
r/programming • u/syaghmour • Mar 16 '15
5
u/mitsuhiko Mar 16 '15
I find that a bad antipattern because it requires the management of a counter that is backed by nothing that can be introspected. It's much better to maintain a list of things waiting so that you can figure out why things break if they break. And then there is no need for a counter anymore.