Instructions For Exercise

This lesson demonstrates how you can run files provided in the exercise.

This exercise lets you explore some real code that uses locks and condition variables to implement various forms of the producer/consumer queue discussed in the chapter. You’ll look at the real code, run it in various configurations, and use it to learn about what works and what doesn’t, as well as other intricacies.

The different versions of the code correspond to different ways to “solve” the producer/consumer problem. Most are incorrect; one is correct. Read the chapter to learn more about what the producer/consumer problem is, and what the code generally does.

Get hands-on with 1200+ tech skills courses.