~/talk

Back to the CompletableFuture: Concurrency

Talkat Conf42 Enterprise Software 2021 · 2021-03-25..05-05· [concurrency]
slides:none on file

Explains why Java moves from Threads/Runnable to ExecutorService and CompletableFuture, with concrete code patterns: use ExecutorService factories and ForkJoinPool work-stealing for thread pools, replace shared state with ConcurrentHashMap and Atomics, and avoid ThreadLocal memory leaks. Shows Fresco image pipeline and Spectrum transcoding using ConcurrentHashMap lookups, and Litho updating UI via CompletableFuture.runAsync and CompletableFuture.thenCombine plus exceptionally for error recovery. Emphasizes nonblocking chaining, controlled completion, and practical pitfalls like blocking get and exception types.

AI-written summary · about

  1. 0:00Concurrency in Java
  2. 3:48From fear to admiration
  3. 9:02Runnable and Threads
  4. 11:12Java 5 concurrency API
  5. 15:22Future limitations
  6. 18:08Executor framework
  7. 20:56Future pitfalls
  8. 22:17CompletableFuture features
  9. 25:44Demo with Litho
  10. 27:10Call to action
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.