- Example
In this lesson, we will go over an example of condition variables.
We'll cover the following...
We'll cover the following...
Example
Explanation
-
The program has two child threads:
t1andt2. -
They get their work packages,
waitingForWorkandsetDataReady, in lines 38 and 39. Using the condition variablecondVar,setDataReadynotifies that its work is done with the preparation of the ...