Flavors of Concurrency in Java
summary
Compares concrete concurrency options by solving a toy problem: query multiple search engines and return the first result, implemented with raw threads using an AtomicReference, with a fixed thread pool via ExecutorCompletionService (4 threads), with the ForkJoin framework (work-stealing) and parallel streams (warning: they use the common pool and can block), with CompletableFuture for composability, with actor message passing and supervision, with Quasar-style fibers for massive lightweight concurrency, and with software transactional memory which he treats as immature for heavy production.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:43Why concurrency matters
- 4:24The problem of concurrency
- 4:43Approach to the session
- 6:29Concurrency vs. parallelism
- 11:52Models for computation
- 13:52Developer survey results
- 15:02The case study problem
- 17:00Bare threads
- 22:54Java memory model
- 25:40Executors and pools
- 30:52Fork-join framework
- 34:45Review of hardware models
- 36:17Completable futures
- 37:56Actor model
- 38:35Fibers and light threads
- 42:13Software transactional memory
- 44:51Conclusions and takeaways
- 47:48Further reading and closing
related talks
56mFlavors of Concurrency in Java
28mBack to the CompletableFuture: Concurrency
48mParallel Streams, CompletableFuture, and All That: Concurrency in Java 8
52mNew Concurrency Utilities in Java 8
47mA Deeper Dive into Java Concurrency Updates
55mBack to the CompletableFuture: Concurrency in Action
46mTour d’horizon de la gestion de la concurrence dans différents langages
44mConcurrency in Scala and on the JVM
