-
Notifications
You must be signed in to change notification settings - Fork 46.1k
关于并发编程的部分5处深度补充,可以增强理解。感谢作者的采纳! #2764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
Snailclimb
commented
Dec 18, 2025
首先谢谢javaguide帮我拿下offer!
这里是我在这次秋招中,深入学习并发的时候,遇到的一些文档中不够深入的地方。也许不会面试遇到,但是可以加深理解。
我的信息来源:
1.各家大厂的公开最佳实践(比如阿里java开发手册,美团技术的公开信息)
2.一些技术大佬的文章(Doug Lea,AQS设计者)
3.一些书籍《深入理解Java虚拟机》(周志明)《Java并发编程的艺术》
注意:使用大模型进行了一些语言润色+辅助举例,这是为了保证用词精准,并且语言风格和上下文一致。
具体更改的点:
- ThreadPoolExecutor 生命周期与拒绝策略
- 线程池的5种生命周期状态(RUNNING → SHUTDOWN → STOP → TIDYING → TERMINATED)
- Worker 工作线程的生命周期管理机制
- 4种拒绝策略的实际应用场景(结合阿里巴巴、美团实践经验)
- AQS 独占/共享模式深入对比
- 独占模式与共享模式的特性对比与状态语义
- Condition 条件队列的工作机制
- 公平锁与非公平锁的性能差异分析
- ThreadLocal 内存泄漏完整分析
- 为什么 Entry 的 key 使用弱引用的设计权衡
- 完整的引用链路分析
- 线程池场景下的特殊风险与美团技术团队真实事故案例
- 阿里巴巴 Java 开发手册的强制要求与正确使用模式(try-finally + remove)
- volatile 内存屏障与 happens-before
- 4种内存屏障类型(LoadLoad、StoreStore、LoadStore、StoreLoad)
- volatile 读写操作的内存屏障插入策略
- volatile 与 happens-before 的关系及传递性示例
- volatile 与 synchronized 的性能对比(引用周志明《深入理解Java虚拟机》)
- DCL(双重检查锁定)单例模式的正确实现与必须使用 volatile 的原因
- CAS 底层实现与优化机制
- ABA 问题的实际影响场景分析(无锁栈的典型案例)
- CPU 层面的 CMPXCHG 指令与 LOCK 前缀机制
- 自旋与阻塞的性能权衡
- LongAdder 的分段 CAS 优化原理(与 ConcurrentHashMap 的 counterCells 机制对应)
太用心了,感谢啊!这几天甲流了,没看Github,处理迟了。欢迎添加我的微信:javaguide1024 ,我给你发个红包感谢这么用心的贡献。
之前文档里有些性能对比用了很具体的数字(比如10倍、10-20倍),但没有给出测试环境和数据来源,容易误导读者。这次把这些改成了相对描述,像" 显著优于\、\性能更好\这样。 另外threadlocal那篇提到的美团事故案例也找不到出处,就改成了通用的场景说明。 最后给jmm.md、cas.md、threadlocal.md都加上了参考资料章节,标注了官方文档、技术书籍和论文的出处,方便大家深入学习。
@REALROOK1E
REALROOK1E
force-pushed
the
main
branch
from
December 19, 2025 10:47
80dc712 to
db32ff6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
首先谢谢javaguide帮我拿下offer!
这里是我在这次秋招中,深入学习并发的时候,遇到的一些文档中不够深入的地方。也许不会面试遇到,但是可以加深理解。
我的信息来源:
1.各家大厂的公开最佳实践(比如阿里java开发手册,美团技术的公开信息)
2.一些技术大佬的文章(Doug Lea,AQS设计者)
3.一些书籍《深入理解Java虚拟机》(周志明)《Java并发编程的艺术》
注意:使用大模型进行了一些语言润色+辅助举例,这是为了保证用词精准,并且语言风格和上下文一致。
具体更改的点: