Advantages of using condition variables over mutex
A condition variable allows a thread to be signaled when something of interest to that thread occurs. By itself, a mutex doesn’t do this. If you just need mutual exclusion, then condition variables don’t do anything for you. However, if you need to know when something happens, then condition variables can help. For example, if … Read more