The condition variable is a synchronization primitive used with a mutex to block one or more threads until another thread notifies the condition variable.