Concurrency Redefined
summary
Jakarta Concurrency 3.1 adds concrete features: programmatic resource definitions with qualifiers and injectable defaults, new context-service APIs for reactive publishers/subscribers, and virtual=true managed executor to request virtual threads on Java 21+. The live demo uses OpenLiberty and shows 100,000 virtual threads sleeping for 1s completing in about 3s, and a MongoDB contextual flow using a contextual subscriber plus recurring work via @Schedule asynchronous methods that start concurrently and can be canceled by their Future.
AI-written summary · about
chapters (19)
- 0:00Introduction and setup
- 1:25What's new in Concurrency 3.1
- 2:06Resource definitions with qualifiers
- 3:56Injecting default resources
- 4:38Context service methods
- 6:31Virtual threads overview
- 8:41Virtual threads background
- 10:08Thread-per-request model
- 11:11Virtual threads API changes
- 12:37Virtual thread management
- 13:44Benefits of virtual threads
- 14:52Pinning and thread locals
- 17:06Concurrency and virtual threads
- 18:15Using virtual=true in specs
- 20:04Scheduled asynchronous methods
- 25:05Summary of new features
- 25:50Demo introduction
- 30:23Running the demo
- 32:30Q&A session
related talks
06mWhat's New in Java Concurrency 3.1
49mJava's Concurrency Journey Continues! Structured Concurrency & Scoped Values
51mJava 21: The revolution of virtual threads
46mJava 21: The Revolution of Virtual Threads - A Deep Dive
38mIntroduction and pitfalls of Java's new concurrency model
49mEven threads are now virtual:past, present, future of concurrency in Java.
49mJava Dark Threads
46mJava 21: The revolution of virtual threads - A Deep dive
