Java High Concurrency Programming in Practice (3rd Edition) cover

Java High Concurrency Programming in Practice (3rd Edition)

Rating 4.2
Word count
599K words
Chapters
9
ISBN
9787121437076

Tags

Summary

This is the third edition of Java High Concurrency Programming in Practice, organized around "the foundations, ideas, methods, and practice of parallel programming" and aimed at developers who already know Java and want to master concurrent and high-concurrency development systematically. The book proceeds along several threads: it begins with the historical background of parallel computing and distinguishes basic concepts such as synchronous and asynchronous, concurrency and parallelism, critical sections, blocking and non-blocking, and deadlock and livelock; it introduces concurrency levels such as blocking, starvation-free, obstruction-free, lock-free, and wait-free, as well as Amdahl's law, Gustafson's law, and the atomicity, visibility, ordering, and happens-before rules of the Java Memory Model (JMM). It then moves into the fundamentals of Java parallel programming, covering thread creation, termination, interruption, wait and notify, suspend and resume, join and yield, as well as volatile, thread groups, daemon threads, thread priorities, and synchronized, using cases such as ArrayList and HashMap failing under concurrency to illustrate "hidden errors." Part three systematically reviews the JDK concurrency package, including reentrant locks, Condition, semaphores, read-write locks, countdown latches, cyclic barriers, thread pools, and concurrent containers and other synchronization and coordination tools; it then discusses lock optimization and precautions, parallel patterns and algorithms, the parallel support and improvements brought by Java 8/9/10, and how to build high-concurrency programs with Akka; finally it turns to debugging techniques for parallel programs and gives a practical example of multithreaded optimization by analyzing Jetty's core code. Building on the structure of the first two editions, the third edition adds deeper content such as GC optimization.

Editor's review

这是一本在国内Java并发书单里被反复提到的实战型读物,最大的特点是“讲得下去”:它不满足于罗列API,而是先花一整章把并发世界的概念地图铺开——同步与异步、并发与并行、阻塞与无锁、Amdahl定律与Gustafson定律、JMM的三大特性与Happen-Before规则,让读者知道自己后面在解决什么问题。 进入正文后,作者用大量可运行的示例带着读者过一遍线程基本操作与volatile、synchronized,再系统进入JDK并发包:重入锁、Condition、信号量、读写锁、倒计数器、循环栅栏、线程池与并发容器。更难得的是,书里专门安排了“锁的优化”“并行模式与算法”和“并行程序调试”这些容易被忽略的内容,并用Jetty核心代码做多线程优化案例分析,把知识落到真实工程上。 第三版把并发生态更新到Java 8/9/10,并补充了GC优化等内容,兼顾了体系完整与时效性。如果你已经能写Java代码,却总在“线程池参数怎么配”“锁为什么没锁住”“线上CPU飙高怎么查”上卡壳,这本书值得放在手边反复翻。

Who it's for

A good fit for

  • 有Java语法基础、想系统补齐并发知识体系的初中级开发人员
  • 需要处理线程池、锁、并发容器等线上问题的后端工程师
  • 准备Java中高级面试、希望把并发原理讲清楚的求职者
  • 对JMM、无锁编程、Akka等高并发话题感兴趣的进阶读者

Not a good fit for

  • 完全没写过Java、连线程概念都不了解的零基础读者
  • 只想看Java 21虚拟线程、结构化并发等最新特性的读者
  • 期待一本纯理论教材或论文式推导的科班学生

Reading tips

  1. 先通读第1章,把并发级别、Amdahl定律与JMM三特性理清,再进入线程操作章节
  2. 第3章JDK并发包建议边读边敲示例,重点动手验证线程池、信号量与并发容器的行为
  3. 第9章Jetty案例可放到最后读,配合源码定位自己项目中的高并发热点
  4. 阅读时对照当前使用的JDK版本,凡涉及Java 8/9/10新特性的章节,注意在新版本中复核

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Entering the Parallel World
  2. Chapter 2 Fundamentals of Java Parallel Programs
  3. Chapter 3 The JDK Concurrency Package
  4. Chapter 4 Lock Optimization and Precautions
  5. Chapter 5 Parallel Patterns and Algorithms
  6. Chapter 6 Java 8/9/10 and Concurrency
  7. Chapter 7 Building High-Concurrency Applications with Akka
  8. Chapter 8 Debugging Parallel Programs
  9. Chapter 9 A Multithreading Optimization Example—Analysis of Jetty Core Code

FAQ

这本书需要什么Java基础?
需要能独立编写Java代码,理解类、接口、集合与基本多线程概念。书中默认读者已有一定开发经验,因此对语法和基础API着墨不多,直接进入并发原理与实践。
第3版和第2版主要差别在哪?
第3版在延续“并行基础—JDK并发包—锁优化—并行模式—Java新特性—Akka—调试—Jetty案例”的框架上做了更新,把并发支持更新到Java 8/9/10,并补充了GC优化等较深内容,篇幅也增至约59.9万字。
书里的并发知识会过时吗?
线程模型、JMM、锁与并发包的核心原理长期有效;涉及具体Java版本特性的部分建议结合官方文档和当前项目所用JDK版本复核。较新的虚拟线程等话题本书第三版未覆盖。
读完能否应对高并发面试?
书中对JMM、volatile、synchronized、CAS与无锁、线程池、并发容器、锁优化等常见考点讲得较系统,并配有案例,适合作为面试复习主线;但面试还需结合项目实践和源码阅读。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

葛一鸣 Author

Ge Yiming is a programming author about whom limited public information is available. His confirmed representative work is Practical Java High-Concurrency Programming (3rd Edition). The book falls under programming design, and its title and successive editions suggest a practice-oriented focus on Java concurrency programming that has been revised over time, indicating a degree of continuity among technical readers. In the absence of clear information about his personal life, education, professional career, awards, or honors, no further speculation about his background should be made. Based on the available work, Ge Yiming's writing is practice-oriented and centers on high-concurrency programming, serving developers who wish to gain a deeper understanding of Java concurrency mechanisms. His profile is therefore best framed in terms of the subject matter and technical direction of his work rather than unverified personal achievements.

More by the same author

Top rated in the same category