Condition variables enable threads to be synchronized via messages.
They need the
One thread acts as a sender, and the other acts as the receiver of the message. The receiver waits for a notification from the sender. Typical use cases for condition variables are sender-receiver or producer-consumer workflows.
A condition variable can be the sender or the receiver of the message.
The following table details the different condition variables and their respective functions.