O'Reilly logo

C++ Multithreading Cookbook by Milos Ljumovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required