~/talk

Using Java 8 Lambdas and Stampedlock to manage thread safety

Talkat Voxxed Days Zurich 2017 · on Thursday, 2017-02-23· [concurrency, java]
slides:none on file

Explains using Java 8 StampedLock for optimistic reads ~90% success and when to fall back to a pessimistic read or exclusive write; shows a Position example that moves x and y together and warns StampedLock is non-reentrant so upgrades can fail and are tricky. Compares implementations: AtomicReference CAS and Unsafe/VarHandle approaches (notes VarHandle parity with Unsafe and often similar speed). Presents lambdas to encapsulate lock idioms, notes checked-exception friction and that real benchmarking depends heavily on contention.

AI-written summary · about

  1. 0:00Start
  2. 24:15Concurrent Hashmap
  3. 26:27Split Lambdas
  4. 33:34Old Move Method
  5. 46:06Pessimistic Read Lock
~/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.