PCSalt
YouTube GitHub

# virtual-threads

3 posts

Java 21 — Scoped Values — The ThreadLocal Replacement

Understand Java's Scoped Values — why they replace ThreadLocal, how they work with virtual threads, and practical patterns for request-scoped data.

Java 21 — Structured Concurrency

Understand Java's Structured Concurrency API — StructuredTaskScope, ShutdownOnFailure, ShutdownOnSuccess, and how it prevents thread leaks in concurrent code.

Java 21 — Virtual Threads Explained with Real Examples

Understand Java virtual threads — how they work, when to use them, migration from thread pools, and real-world performance comparisons with platform threads.