16 Designing multithreaded programs

This chapter covers

  • Multiple threads of execution
  • Protecting shared resources
  • Synchronizing multiple threads of execution

Knowing how to design and develop multithreaded applications allows us to take advantage of a computer’s ability to handle multiple threads of execution. A thread is a path the computer takes through the code as it executes your program. Multithreading means the computer is running multiple paths at the same time.

If we design multithreaded applications properly, they can take better advantage of today’s multicore computers (i.e., computers with multiple CPUs). Some applications inherently require simultaneous operations, and we can only design them to be multithreaded.

This chapter ...

Get Object-Oriented Software Design in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.