Get The Most Out of Virtual Threads in Java 25 - A Deep Dive into the Latest Achievements of Virtual Threads, Structured Concurrency and ScopedValues
Conference (INTERMEDIATE level)
Room C
Structured Concurrency and ScopedValues are available as preview features since Java 21. But since then virtual threads and Structured concurrency have changed a lot and the small amount of remaining issues and shortcomings where finally fixed in Java 24 and Java 25.
To be able to get a deep understanding of how we can use them to their full potential, we will start with an empty Java application. In a live coding session, we will iteratively update it together to a fully functioning, concurrent web application by combining Virtual threads with StructuredTaskScope and ScopedValue.
During the process we will see why we should use ScopedValues instead of ThreadLocals when possible and how to build our own StructuredTaskScopes tailored to our needs with the latest features added by Java 25.
The goal of this talk is to provide to everyone who attends a deep understanding of how these new features work and how they can be used in a real life scenario.
To be able to get a deep understanding of how we can use them to their full potential, we will start with an empty Java application. In a live coding session, we will iteratively update it together to a fully functioning, concurrent web application by combining Virtual threads with StructuredTaskScope and ScopedValue.
During the process we will see why we should use ScopedValues instead of ThreadLocals when possible and how to build our own StructuredTaskScopes tailored to our needs with the latest features added by Java 25.
The goal of this talk is to provide to everyone who attends a deep understanding of how these new features work and how they can be used in a real life scenario.
Christian Wörz
Christian Woerz
Christian is a software developer and Microsoft MVP with over 15 years of experience in the field. He loves to write code in Java, TypeScript and JavaScript. In his spare time he tries to convince others to also start using these languages by giving engaging live-coding conference talks and trainings. When there‘s time left he records videos trying to explain the most complex concepts of TypeScript in a simple way.