~/talk

Handling concurrent access to shared resources in Java

Talkat JCON EUROPE 2024 · 2024-05-13..05-16· [concurrency]
links:none on file
slides:none on file

Shows concrete Java fixes: a flaky library/book-rental demo that sometimes gives the same book to two threads, fixed by synchronizing on the book and then broken again when a synchronized method plus wait/notify causes a deadlock. Covers synchronized, ReentrantLock, ReentrantReadWriteLock, volatile semantics, and advice to unlock in finally. Notes virtual threads still use carrier threads and synchronized pins carrier threads so prefer explicit locks. Discusses distributed strategies, optimistic vs pessimistic locking, and Spring Integration for DB-backed distributed locks.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 3:38What is concurrency in Java
  3. 7:36Levels of concurrency in Java
  4. 10:08Shared resources and race conditions
  5. 16:17Solving race conditions with synchronization
  6. 20:13Synchronized blocks and methods
  7. 25:19Demo: Library book rental race condition
  8. 30:32Using locks for concurrency control
  9. 33:04Read-write locks explained
  10. 35:12Virtual threads and synchronization
  11. 37:25Concurrency in distributed systems
  12. 39:54Q&A on concurrency challenges
~/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.