~/talk

Flying Futures in the same sky can make the moon sun at midnight

Talkat ScalaIO 2019 · 2019-10-29..10-31· [machine-learning]
slides:none on file

Title describes flaky tests caused by flying futures that share resources: concurrent Futures on the JVM race on mutable state so the moon can look like the sun at midnight. Concrete issues: visibility, lost updates, expensive OS threads. Practical fixes shown: thread pools / custom ExecutionContext, volatile, synchronized or AtomicReference, countdown latches; tradeoffs on performance. Functional alternatives demonstrated: ZIO fibers with fork and collectAll and STM retries until commit to provide atomic shared state, eliminating the race and making the example deterministically correct.

AI-written summary · about

  1. 0:00Flying futures introduction
  2. 1:49Parallelism vs concurrency
  3. 3:34Shared mutable state issues
  4. 13:31Race conditions in programs
  5. 15:23Memory visibility problems
  6. 19:06Visibility and sync solutions
  7. 21:28ZIO introduction
  8. 25:24STM for atomic transactions
  9. 28:19Solving solar system with STM
  10. 30:56Why use concurrency libraries
  11. 31:45Closing and resources
~/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.