Question - What are condition variable.
Answer -
These are synchronization objects which help threads wait for particular conditions to occur.
Without condition variable, the thread has to continuously check the condition which is very costly on the resources.
Condition variable allows the thread to sleep and wait for the condition variable to give it a signal