Is it true that C++0x will come without semaphores? There are already some questions on Stack Overflow regarding the use of semaphores. I use them (posix semaphores) all the
C++20 will finally have semaphores - std::counting_semaphore
.
These will have (at least) the following methods:
acquire()
(blocking)try_acquire()
(non-blocking, returns immediatel)try_acquire_for()
(non-blocking, takes a duration)try_acquire_until()
(non-blocking, takes a time at which to stop trying)release()
This isn't listed on cppreference yet, but you can read these CppCon 2019 presentation slides, or watch the video. There's also the official proposal P0514R4, but I'm not sure that's the most up-to-date version.