Conference40min
The Hidden Art of Thread-Safe Programming: Exploring java.util.concurrent
The text highlights the difficulty of writing thread-safe code and how concurrency bugs can remain hidden for years. It then examines techniques used in Java’s java.util.concurrent classes, including lock striping, lock splitting, weakly consistent iteration, and copy-on-write patterns.
talk.summaryAiDisclaimer
Heinz KabutzJavaSpecialists.eu
talkDetail.whenAndWhere
Saturday, November 21, 16:20-17:00
Room 1 - Thessaloniki
talks.roomOccupancytalks.noOccupancyInfo
Writing correct, thread-safe code is notoriously challenging. Unlike single-threaded code, concurrency bugs often remain hidden, waiting for the perfect storm of conditions to emerge. Even the standard Vector class, long trusted for its thread safety, harbored a race condition for 5 years, only to introduce a potential deadlock that persisted for the next 9 years.
The classes in java.util.concurrent are used in all major Java projects, either directly or indirectly. In this session, we will take a close look at some of the techniques used to create them. We will explore topics like lock striping in LongAdder, lock splitting in LinkedBlockingQueue, weakly consistent iteration in ArrayBlockingQueue, and check-then-act in CopyOnWriteArrayList.
The classes in java.util.concurrent are used in all major Java projects, either directly or indirectly. In this session, we will take a close look at some of the techniques used to create them. We will explore topics like lock striping in LongAdder, lock splitting in LinkedBlockingQueue, weakly consistent iteration in ArrayBlockingQueue, and check-then-act in CopyOnWriteArrayList.