~/talk

Thread Safety with Phaser, StampedLock and VarHandle.

Talkat Devoxx Ukraine 2020 · 2020-11-05..11-07· [java, concurrency]
slides:none on file

Compares Phaser, StampedLock and VarHandle with microbench demos: measuring thread start jitter (volatile spin and countdown vs a phaser is a managed blocker), showing phaser achieves far tighter start alignment (examples show 27–42M start-coordination metrics) and supports ForkJoin/Loom but hits a 65k-party limit requiring hierarchical phasers for millions of virtual threads. Shows StampedLock’s optimistic read + validate cuts system-time from ~25% to ~3–5% in a position example, and a VarHandle array CAS variant gives high-throughput, lock-free updates.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:18Thread safety overview
  3. 2:58Phaser class explanation
  4. 4:20Wait-notify demo
  5. 10:37Countdown latch demo
  6. 13:28Volatile and spin locks
  7. 15:21Phaser performance demo
  8. 19:32StampedLock concepts
  9. 27:38StampedLock implementation
  10. 32:58Java 11 StampedLock idioms
  11. 44:15VarHandle demo
  12. 50:39Closing remarks
~/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.