Advantages of using condition variables over mutex
问题 I was wondering what is the performance benefit of using condition variables over mutex locks in pthreads. What I found is : "Without condition variables, the programmer would need to have threads continually polling (possibly in a critical section), to check if the condition is met. This can be very resource consuming since the thread would be continuously busy in this activity. A condition variable is a way to achieve the same goal without polling." (https://computing.llnl.gov/tutorials