July 2022
Beginner
748 pages
15h 1m
English
In this chapter, we will discuss ways to increase Java application performance by using workers (threads) that process data concurrently. We will explain the concept of Java threads and demonstrate their usage. We will also talk about the difference between parallel and concurrent processing and how to avoid unpredictable results caused by the concurrent modification of a shared resource.
After finishing this chapter, you will be able to write code for multithreaded processing—creating and executing threads and using a pool of threads in parallel and concurrent cases.
The following topics will be covered in this chapter: