Using synchronized threads

Contrary to the previous recipe, there are a lot of situations where parallel tasks need to occur with dependency on each other. Such situations could occur in an application with a user interface dialog for displaying customers and for the selected customer payment history. For example, on the application window, there is a list view with customers. Below, there is a list view with the payment history for a selected customer. When loading the initial set of customers, we need to display the first customer's (selected on load) payment history. We'll start one thread for loading the customer list. At the same time, another thread that is responsible for loading a specific customer payment history will also start. Until ...

Get C++ Multithreading Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.