$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [thread] semaphore
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-09-18 02:19:00
> 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