Architecture, Perf. & Sec.Architecture, Perf. & Sec.
Conference50min
ADVANCED

The Hidden Art of Thread-Safe Programming: Exploring java.util.concurrent

This session examines techniques for writing thread-safe Java code, highlighting challenges like hidden concurrency bugs. It reviews java.util.concurrent classes, such as LongAdder's lock striping, LinkedBlockingQueue's lock splitting, ArrayBlockingQueue's weakly consistent iteration, and CopyOnWriteArrayList's check-then-act, demonstrating their role in major Java projects.

Heinz Kabutz
Heinz KabutzJavaSpecialists.eu

talkDetail.whenAndWhere

Thursday, June 19, 16:00-16:50
Main Room
talks.description
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.
deadlock
concurrency
java.util.concurrent
thread-safe
talks.speakers
Heinz Kabutz

Heinz Kabutz

JavaSpecialists.eu

Greece

Dr. Heinz Kabutz is a globally recognized Java Champion and the creator of the acclaimed Java Specialists' Newsletter, which has been read by thousands of advanced Java programmers worldwide. With a PhD in Computer Science and decades of hands-on experience, Heinz is renowned for his deep technical insights, particularly in the areas of Java concurrency, performance optimization, and advanced programming techniques. As a sought-after speaker, trainer, and consultant, he has delivered engaging talks and workshops at premier Java conferences and for leading companies around the globe. Heinz's practical, no-nonsense approach to Java programming has made him a trusted authority in the industry. (Wow, thanks ChatGPT!) https://www.javaspecialists.eu
comments.title

comments.speakerNotEnabledComments