Tagged articles
2 articles
Page 1 of 1
Java Backend Technology
Java Backend Technology
Oct 8, 2024 · Fundamentals

Mastering Java StructuredTaskScope: Simplify Concurrency with Virtual Threads

JEP 453 integrates StructuredTaskScope into Java 21, offering a preview API that replaces Future with Subtask, enabling lightweight virtual‑thread based concurrent tasks, such as fetching data from multiple servers and automatically cancelling slower calls, while simplifying error handling and improving observability.

JDK21StructuredTaskScopeVirtual Threads
0 likes · 8 min read
Mastering Java StructuredTaskScope: Simplify Concurrency with Virtual Threads
Code Ape Tech Column
Code Ape Tech Column
Nov 18, 2023 · Backend Development

Understanding ThreadLocal, ScopedValue, and StructuredTaskScope in Java

This article explains the ThreadLocal mechanism, its memory‑leak pitfalls, introduces the new ScopedValue feature in JDK 20 as a safer alternative, and demonstrates practical Spring and virtual‑thread examples using StructuredTaskScope for modern Java backend concurrency.

ScopedValueStructuredTaskScopeThreadLocal
0 likes · 22 min read
Understanding ThreadLocal, ScopedValue, and StructuredTaskScope in Java