Tagged articles

ScopedValue

7 articles · Page 1 of 1
Random Bulletin
Random Bulletin
Jul 24, 2026 · Backend Development

Context Propagation at Ten‑Million QPS: From ThreadLocal to Explicit

The article examines a real‑world incident where ThreadLocal leakage caused user data mix‑ups, then walks through the evolution of context propagation—from implicit ThreadLocal to TTL patches, Reactor Context, ScopedValue, and Go's explicit context—highlighting trade‑offs and best practices for high‑throughput systems.

ConcurrencyContextPropagationGoContext
0 likes · 15 min read
Context Propagation at Ten‑Million QPS: From ThreadLocal to Explicit
IT Services Circle
IT Services Circle
Nov 2, 2025 · Backend Development

Why ScopedValue Is the Future Replacement for ThreadLocal in Java

This article explores the limitations of ThreadLocal—memory leaks, data contamination, inheritance issues, and performance overhead—and introduces Java's ScopedValue as a safer, more efficient alternative, covering its core design, basic and advanced usage, performance benchmarks, migration strategies, and real‑world web application examples.

ConcurrencyJavaScopedValue
0 likes · 28 min read
Why ScopedValue Is the Future Replacement for ThreadLocal in Java
Su San Talks Tech
Su San Talks Tech
Nov 1, 2025 · Backend Development

Why ScopedValue Is the Future of Thread-Local Data in Java

This article explores the limitations of ThreadLocal, introduces Java's new ScopedValue feature, provides detailed usage examples, performance benchmarks, migration strategies, and compares both approaches to help developers decide when and how to adopt ScopedValue in modern backend applications.

ConcurrencyJavaScopedValue
0 likes · 34 min read
Why ScopedValue Is the Future of Thread-Local Data in Java
Java Backend Technology
Java Backend Technology
Jul 8, 2025 · Backend Development

ThreadLocal vs ScopedValue: Why ScopedValue Is the New King in Java Concurrency

ThreadLocal has long served as Java’s go‑to tool for thread‑local data, but its memory‑leak risks and performance penalties become pronounced with virtual threads, while the newer ScopedValue offers automatic cleanup, immutable safety, and superior efficiency, making it a compelling replacement in high‑concurrency scenarios.

ConcurrencyScopedValueThreadLocal
0 likes · 12 min read
ThreadLocal vs ScopedValue: Why ScopedValue Is the New King in Java Concurrency