The Java Sessions: Virtual Threads, Scoped Variables, and Structured Concurrency
This session will look at three essential concepts in Modern Java 20+: Virtual Thread, Scoped Variables, and Structured Concurrency.
Virtual Threads
A new way of threading is now available to Java, and it is time to prepare. Project Loom introduced Java Virtual Threads, tiny threads meant to perform quick operations requiring long-running OS threads, which can prove expensive. This class will teach us how to use these threads, their relationship with the rest of the Java API, and what it means for third-party libraries.
Scoped Values
Scoped values are thread-safe to share with methods without using method parameters. They are preferred to the old thread-local variables, especially when using large numbers of virtual threads.
Structured Concurrency
Structured Concurrency simplifies concurrent programming by introducing an API for structured concurrency. Structured concurrency treats groups of related tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability.
About Daniel Hinojosa
Daniel is a programmer, consultant, instructor, speaker, and recent author. With over 20 years of experience, he does work for private, educational, and government institutions. He is also currently a speaker for No Fluff Just Stuff tour. Daniel loves JVM languages like Java, Groovy, and Scala; but also dabbles with non JVM languages like Haskell, Ruby, Python, LISP, C, C++. He is an avid Pomodoro Technique Practitioner and makes every attempt to learn a new programming language every year. For downtime, he enjoys reading, swimming, Legos, football, and barbecuing.
More About Daniel »