Java virtual threads
Virtual threads make blocking code practical at higher concurrency, while databases and downstream services still have limits. Read the introduction first, try the web crawler, and then examine what happens under load. The older examples reflect the Java releases available when they were written.
Start here
- Unleashing the Power of Lightweight Concurrency: A Comprehensive Guide to Java Virtual Threads (Part 1)
Understand the execution model and APIs.
- Web Crawling in Java: A Tale of Classical Threads and Virtual Threads
Apply virtual threads to a web crawler.
- Java Virtual Threads Under Load: Three Limits to Make Explicit
Make resource limits and cancellation explicit.
Explore
- Java Virtual Threads Under Load: Three Limits to Make Explicit
- How to Diagnose and Mitigate Pinning in Java’s Virtual Thread Execution
- Web Crawling in Java: A Tale of Classical Threads and Virtual Threads
- Unleashing the Power of Lightweight Concurrency: A Comprehensive Guide to Java Virtual Threads (Part 1)
- Your Java Code in the Fastlane: Creating a Million Virtual Threads Using Project Loom to Improve Throughput