The C++ std::condition_variable is similar to Windows' Event. While the latter is designed to be used alone, std::condition_variable
must be used with std::mutex
. I know about many use cases where a std::condition_variable
and std::mutex
combination would be perfect. I also know that in certain cases, something that can be used alone like Windows' Event would come in handy. So, I begin to wondering the design underlying std::condition_variable
. Is it because std::condition_variable
and std::mutex
are often used together, or std::condition_variable
itself uses the std::mutex
to implement its functionality?
vendredi 3 avril 2015
Design underlying std::condition_variable
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire