出版社: Addison-Wesley Professional
出版年: 2006-5-19
页数: 384
定价: USD 59.99
装帧: Paperback
ISBN: 9780321349606
内容简介 · · · · · ·
This book covers:
Basic concepts of concurrency and thread safety
Techniques for building and composing thread-safe classes
Using the concurrency building blocks in java.util.concurrent
Performance optimization dos and don'ts
Testing concurrent programs
Advanced topics such as atomic variables, nonblocking algorithms, and the Java Memory Model
Java Concurrency in Practice的创作者
· · · · · ·
-
Joshua Bloch 作者
-
Brian Goetz 作者
作者简介 · · · · · ·
Brian Goetz is a software consultant with twenty years industry experience, with over 75 articles on Java development. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Tim Peierls is the very model of a modern multiprocessor, with BoxPop.biz, recording arts, and going...
Brian Goetz is a software consultant with twenty years industry experience, with over 75 articles on Java development. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Tim Peierls is the very model of a modern multiprocessor, with BoxPop.biz, recording arts, and goings on theatrical. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Joshua Bloch is a principal engineer at Google and a Jolt Award-winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Josh led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie Mellon University.
Joseph Bowbeer is a software architect at Vizrea Corporation where he specializes in mobile application development for the Java ME platform, but his fascination with concurrent programming began in his days at Apollo Computer. He served on the JCP Expert Group for JSR-166 (Concurrency Utilities).
David Holmes is director of DLTeCH Pty Ltd, located in Brisbane, Australia. He specializes in synchronization and concurrency and was a member of the JSR-166 expert group that developed the new concurrency utilities. He is also a contributor to the update of the Real-Time Specification for Java, and has spent the past few years working on an implementation of that specification.
Doug Lea is one of the foremost experts on object-oriented technology and software reuse. He has been doing collaborative research with Sun Labs for more than five years. Lea is Professor of Computer Science at SUNY Oswego, Co-director of the Software Engineering Lab at the New York Center for Advanced Technology in Computer Applications, and Adjunct Professor of Electrical and Computer Engineering at Syracuse University. In addition, he co-authored the book, Object-Oriented System Development (Addison-Wesley, 1993). He received his B.A., M.A., and Ph.D. from the University of New Hampshire.
目录 · · · · · ·
Preface xvii
Chapter 1: Introduction 1
1.1 A (very) brief history of concurrency 1
1.2 Benefits of threads 3
1.3 Risks of threads 5
· · · · · · (更多)
Preface xvii
Chapter 1: Introduction 1
1.1 A (very) brief history of concurrency 1
1.2 Benefits of threads 3
1.3 Risks of threads 5
1.4 Threads are everywhere 9
Part I: Fundamentals 13
Chapter 2: Thread Safety 15
2.1 What is thread safety? 17
2.2 Atomicity 19
2.3 Locking 23
2.4 Guarding state with locks 27
2.5 Liveness and performance 29
Chapter 3: Sharing Objects 33
3.1 Visibility 33
3.2 Publication and escape 39
3.3 Thread confinement 42
3.4 Immutability 46
3.5 Safepublication 49
Chapter 4: Composing Objects 55
4.1 Designing a thread-safe class 55
4.2 Instance confinement 58
4.3 Delegating thread safety 62
4.4 Adding functionality to existing thread-safe classes 71
4.5 Documenting synchronization policies 74
Chapter 5: Building Blocks 79
5.1 Synchronized collections 79
5.2 Concurrent collections 84
5.3 Blocking queues and the producer-consumer pattern 87
5.4 Blocking and interruptible methods 92
5.5 Synchronizers 94
5.6 Building an efficient, scalable result cache 101
Part II: Structuring Concurrent Applications 111
Chapter 6: Task Execution 113
6.1 Executing tasks in threads 113
6.2 The Executor framework 117
6.3 Finding exploitable parallelism 123
Chapter 7: Cancellation and Shutdown 135
7.1 Task cancellation 135
7.2 Stopping a thread-based service 150
7.3 Handling abnormal thread termination 161
7.4 JVM shutdown 164
Chapter 8: Applying Thread Pools 167
8.1 Implicit couplings between tasks and execution policies 167
8.2 Sizing thread pools 170
8.3 Configuring ThreadPoolExecutor 171
8.4 Extending ThreadPoolExecutor 179
8.5 Parallelizing recursive algorithms 181
Chapter 9: GUI Applications 189
9.1 Why are GUIs single-threaded? 189
9.2 Short-running GUI tasks 192
9.3 Long-running GUI tasks 195
9.4 Shared data models 198
9.5 Other forms of single-threaded subsystems 202
Part III: Liveness, Performance, and Testing 203
Chapter 10: Avoiding Liveness Hazards 205
10.1 Deadlock 205
10.2 Avoiding and diagnosing deadlocks 215
10.3 Other liveness hazards 218
Chapter 11: Performance and Scalability 221
11.1 Thinking about performance 221
11.2 Amdahl's law 225
11.3 Costs introduced by threads 229
11.4 Reducing lock contention 232
11.5 Example: Comparing Map performance 242
11.6 Reducing context switch overhead 243
Chapter 12: Testing Concurrent Programs 247
12.1 Testing for correctness 248
12.2 Testing for performance 260
12.3 Avoiding performance testing pitfalls 266
12.4 Complementary testing approaches 270
Part IV: Advanced Topics 275
Chapter 13: Explicit Locks 277
13.1 Lock and ReentrantLock 277
13.2 Performance considerations 282
13.3 Fairness 283
13.4 Choosing between synchronized and ReentrantLock 285
13.5 Read-write locks 286
Chapter 14: Building Custom Synchronizers 291
14.1 Managing state dependence 291
14.2 Using condition queues 298
14.3 Explicit condition objects 306
14.4 Anatomy of a synchronizer 308
14.5 AbstractQueuedSynchronizer 311
14.6 AQS in java.util.concurrent synchronizer classes 314
Chapter15: Atomic Variables and Nonblocking Synchronization 319
15.1 Disadvantages of locking 319
15.2 Hardware support for concurrency 321
15.3 Atomic variable classes 324
15.4 Nonblocking algorithms 329
Chapter 16: The Java Memory Model 337
16.1 What is a memory model, and why would I want one? 337
16.2 Publication 344
16.3 Initialization safety 349
Appendix A: Annotations for Concurrency 353
A.1 Class annotations 353
A.2 Field andmethod annotations 353
Bibliography 355
Index 359
· · · · · · (收起)
喜欢读"Java Concurrency in Practice"的人也喜欢的电子书 · · · · · ·
喜欢读"Java Concurrency in Practice"的人也喜欢 · · · · · ·
Java Concurrency in Practice的书评 · · · · · · ( 全部 61 条 )
翻译错误真是随处即拾
一段未完的奇妙的旅程
翻译质量太差啦,建议翻译者跳出认知假设来翻译,质量好些
> 更多书评 61篇
论坛 · · · · · ·
在这本书的论坛里发言这本书的其他版本 · · · · · · ( 全部3 )
-
机械工业出版社 (2012)9.0分 1637人读过
-
电子工业出版社 (2007)8.8分 375人读过
以下书单推荐 · · · · · · ( 全部 )
- 多核与并行编程参考书目 (NullPointer)
- Computer_Science (雷Sir)
- 米牛牛算算数 (米牛牛)
- 并行编程系列 | Parallel Programming Series (guancheng)
- Java (r2g2)
谁读这本书? · · · · · ·
二手市场
· · · · · ·
订阅关于Java Concurrency in Practice的评论:
feed: rss 2.0
0 有用 豆友2736221 2011-05-07 23:53:04
写得很好,读这本书不仅能学习一些java并发编程的习惯用法,还能学到一些通用的并发编程技术
2 有用 eminemheaton 2016-05-18 22:35:19
仔细看了遍原版,真心写的很深入!很有帮助。 201605
0 有用 accfcx 2022-02-26 17:13:21
补债
0 有用 拉脚 2017-07-21 22:36:12
java可以挖掘的东西比想象中要多
0 有用 r2g2 2011-03-02 23:19:55
pdf档
0 有用 KeYY 2024-02-09 17:39:28 美国
我觉得不需要描述这本书的优秀了,就算这本书是在多年前基于Java5编写的,其内部的知识仍然非常有价值并且不过时。无论是对于Java还是其他语言的工程师来说,这本书对于理解多线程编程都非常有价值。 硬要挑刺的话就是由于这本书已经过了很久了,一些Java新的Concurrency编程模型例如CompletableFuture、JDK 21的Virtual Thread、JVM多年的变化都没有cover... 我觉得不需要描述这本书的优秀了,就算这本书是在多年前基于Java5编写的,其内部的知识仍然非常有价值并且不过时。无论是对于Java还是其他语言的工程师来说,这本书对于理解多线程编程都非常有价值。 硬要挑刺的话就是由于这本书已经过了很久了,一些Java新的Concurrency编程模型例如CompletableFuture、JDK 21的Virtual Thread、JVM多年的变化都没有cover到。 (展开)
0 有用 79lawyer 2024-01-02 22:58:34 北京
我的java并发入门书,挺好,很多例子
0 有用 Babyccino 2023-12-21 20:31:31 广东
读的是思想,与语言无关。适合任何一名programmer阅读。
0 有用 悲凉的点缀… 2023-06-27 14:22:23 陕西
java并发编程实战的原版,可惜大佬们不写书了
0 有用 eleven 2023-02-15 15:10:03 广东
Java 并发编程经典书籍,深入讲解了并发编程的道与术,绝大部分 Java 并发相关的生产问题或者系统设计的解决方案都能在本书中找到答案。