Compile the program with the following command:
g++ Thread.cpp main.cpp -o conditional_variable.exe -std=c++17 -lpthread
The following snapshot demonstrates the output of the program:

Great! Our condition variable demo works as expected. The producer and consumer threads are working together cooperatively with the help of a conditional variable.