Condition Variables
Let's talk about condition variables that enable threads to wait until a particular condition occurs.
We'll cover the following...
Condition variables enable threads to be synchronized via messages. They need the header <condition_- variable>
. One thread acts as a sender, and the other as a receiver of the message. The receiver waits for the notification of the sender. Typical use cases for condition variables are producer-consumer workflows.
A condition variable can be the sender but also the receiver of the message.
Method | Description |
---|