This is a follow-up to Can C++11 condition_variables be used to synchronize processes?.
Can std::condition_variable objects be used as counting semaphores?
Methinks not because the object seems bound to a std::mutex, which implies it can only be used as a binary semaphore. I've looked online, including here, here, and here, but can't find reference or example of using these objects as counting semaphores.
Aucun commentaire:
Enregistrer un commentaire