~/talk

Parallel and Asynchronous Programming with Streams and CompletableFuture

Talkat Devoxx Belgium 2017 · 2017-11-06..11-10· [java]
slides:none on file

Covers concrete rules and demos for Java 8 parallel streams and CompletableFuture: shows a real timing example (17s → 4s with parallel), warns that adding more threads can make performance worse, explains ordering gotchas and that parallel streams master switch affects the whole pipeline, demonstrates that reduce must use identity (not an arbitrary initial value), reveals the common ForkJoin pool default (common ForkJoin pool = cores-1), and shows async composition patterns (compose vs thenCombine) plus Java 9 timeouts; code examples are available for download.

AI-written summary · about

  1. 0:00Start
  2. 2:31Java Concurrency in Practice
  3. 3:03The Parallel Streams Library
  4. 6:36The Collection Pipeline Pattern
  5. 9:08Collection Pipeline Pattern
  6. 10:12Dark Days before Java 8
  7. 13:29Parallelism Is a Master Switch
  8. 14:10Sequential Execution
  9. 30:37Reduce Method
  10. 53:39Output the Pool
  11. 1:25:32Completable Futures
  12. 1:34:45Example of Creating a Completable Future
  13. 1:37:12Supplier Functional Interface
  14. 1:40:49Threat of Execution
~/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.