- Exercise

In this exercise, you will design a ping-pong game using the concepts of multithreading.

We'll cover the following

Task

Write a simple ping-pong game in which two threads alternatively set a bool value to true or false.

One thread sets the value to true and notifies the other thread. The other thread sets the value to false and notifies the other thread. The play should end after a fixed amount of iterations.

Use necessary header files

Get hands-on with 1000+ tech skills courses.