In order to develop parallel algorithms successfully, without meeting the most difficult problems related to concurrency, we can apply some interesting code patterns that will help us in avoiding mistakes in future multithreaded applications. In this chapter, we will study new ways to keep control over the concurrent threads, and we will go on improving our parallel programming capabilities working with more challenging problems to solve. Reading it and following the exercises we shall:
Find out how to apply innovative algorithms to generate portions from a huge piece
Learn to create highly independent blocks of code to run in multiple threads avoiding many classic concurrency problems
Discover how to use flags in multiple threads
Find out how to apply new techniques to have exhaustive control over asynchronous and synchronous execution
Learn techniques to use multithreading in non thread-safe components
Improve the decoupling of the UI when...