18 Sep
2013
18 Sep
'13
6:19 a.m.
As I understood the reason semaphores were not included in c++11 was because they were too hard to use and the recommendation is to just use condition_variable instead.
i'm not sure about the rationale for not including semaphores, but tbo condition_variables are not exactly easy to use, either and i've seen a lot of code, which does not use them correctly. also the API is a bit crippled, as they do not allow to identify spurious wakeups ... performance is another point.
What is wrong with guidance that would lead us back to wanting to use semaphores?
both semaphores and win32-style events have valid use cases, both will be part of boost.sync. and i would not mind having them in a future c++ standard! tim