The Hidden Art of Thread-Safe Programming: Exploring java.util.con...
summary
Walks through concrete code, bugs and benchmarks inside java.util.concurrent: demonstrates 100 million increments where AtomicLong spends ~6s and LongAdder drops to 60–120ms — roughly ~100x faster by striping cells and reducing contention; compares LinkedBlockingQueue vs LinkedBlockingDeque vs ArrayBlockingQueue with single-producer/multi-consumer effects and lock-splitting consequences; shows CopyOnWriteArrayList’s quadratic add cost and the linear addAll workaround; traces real JDK failures (Vector serialization/deadlock history and five bugs fixed in Java 26) and offers tested synchronizer patterns.
AI-written summary · about
chapters (13)
- 0:00Introduction and concurrency questions
- 2:19Single-threaded concurrency myth
- 3:01Thread-safe Vector class history
- 8:23Why thread safety is subtle
- 9:28Studying Java concurrent classes
- 17:42LongAdder vs AtomicLong demo
- 24:51Hardware evolution and concurrency
- 28:41Building a starting gun synchronizer
- 35:05LinkedBlockingQueue performance
- 41:23ArrayBlockingQueue iteration quirks
- 44:53CopyOnWriteArrayList performance
- 48:23Thread termination and stop method
- 49:48Q&A and closing
related talks
45mThe Hidden Art of Thread-Safe Programming: Exploring java.util.concurrent
52mNonblocking algorithms/ CAS/Atomics
43mRolling with New Java Enhancements: Practical Design Patterns
48mConcurrency: It’s Harder (and Easier) Than You Think
45mHow difficult can it be to write efficient code?
38mAsk Me Anything with Doug Lea
48mHandling concurrent access to shared resources in Java
01h 50mJava™ 19 & 20. What's new and noteworthy?
