One of the Windows synchronization objects is mutex. We use mutex when we want to acquire exclusive access to some shared object. We also use mutex when we want to protect some part of the code, to be executed by one thread at a time.
In our following example, we will ask the user to provide a text file with six integer coordinates on each line in order to calculate a system of two linear equations:
We will also use the
CQueue class, previously implemented in Chapter 1, Introduction to C++ Concepts and Features. Our task is to load all the values from the file, and then each group of coordinates will be added to the queue. When each group ...