Skip to Content
Learn Java 17 Programming - Second Edition
book

Learn Java 17 Programming - Second Edition

by Nick Samoylov
July 2022
Beginner
748 pages
15h 1m
English
Packt Publishing
Content preview from Learn Java 17 Programming - Second Edition

Chapter 8: Multithreading and Concurrent Processing

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:

  • Thread versus process
  • User thread versus daemon
  • Extending the Thread ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck
Learning Java, 5th Edition

Learning Java, 5th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
The Well-Grounded Java Developer, Second Edition

The Well-Grounded Java Developer, Second Edition

Benjamin Evans, Martijn Verburg, Jason Clark

Publisher Resources

ISBN: 9781803241432Supplemental Content