The event synchronization object works as a signal for alerting the thread in a certain manner. It can be used to start or stop an execution, or when a user input is performed, and so on.
We will use the same example as in our previous two topics, with improvement to application behavior by adding an event that will signal the threads that the user wants to abort the execution and end the program. In this way, we will make our application even more user friendly and more responsive to user input.
Make sure Visual Studio is up and running.
How to do it...
Now, let's create our program and explain its structure.
- Create a new empty C++ Windows application named
- Open Solution Explorer and right-click on ...