Why it is required to lock a mutex before calling pthread_cond_wait?
Also, is it required to take a lock (on the same mutex) before calling pthrea
Condition variables are for synchronising on a condition that you are expecting to change. Locking ensures that:
A condition system that doesn't use mutexes would be much more brittle.