Tagged articles
4 articles
Page 1 of 1
JavaGuide
JavaGuide
Feb 11, 2026 · Backend Development

Do ThreadLocal Values Fail in Asynchronous Scenarios? An Interviewer's Trick Question Explained

This article explains why ThreadLocal values are not automatically transferred in asynchronous or thread‑pool contexts, compares JDK's InheritableThreadLocal with Alibaba's TransmittableThreadLocal (TTL), and shows how TTL captures, replays, and restores context safely with code examples and diagrams.

Context propagationInheritableThreadLocalJava concurrency
0 likes · 13 min read
Do ThreadLocal Values Fail in Asynchronous Scenarios? An Interviewer's Trick Question Explained
Huolala Tech
Huolala Tech
Aug 13, 2025 · Backend Development

Why Do Inherited ThreadLocals Cause Task Failures in XXL‑Job?

An in‑depth analysis reveals that stale parameters stored in InheritableThreadLocal objects during thread‑pool reuse cause XXL‑Job tasks to process incorrect data, and provides debugging steps and best‑practice recommendations to prevent context pollution.

Context propagationDebuggingInheritableThreadLocal
0 likes · 10 min read
Why Do Inherited ThreadLocals Cause Task Failures in XXL‑Job?
Taobao Frontend Technology
Taobao Frontend Technology
May 19, 2020 · Backend Development

Implicitly Passing Context in Node.js with AsyncHooks

This article explains how Node.js’s AsyncHooks API can be used to implicitly propagate request context across asynchronous calls, illustrates the mechanism with login flow diagrams, compares explicit context handling in frameworks like Express and Egg, and discusses performance and adoption considerations.

AsyncHooksBackendContext propagation
0 likes · 8 min read
Implicitly Passing Context in Node.js with AsyncHooks
Bitu Technology
Bitu Technology
Dec 18, 2018 · Backend Development

Managing Request Context in Node.js with async_hooks without Monkey Patching

This article explains how to propagate request‑level context in a Node.js HTTP service by building a call‑tree with async_hooks, avoiding monkey‑patching, handling lifecycle quirks, preventing memory leaks, and using reference‑counted cleanup to ensure reliable context queries.

BackendContext propagationNode.js
0 likes · 15 min read
Managing Request Context in Node.js with async_hooks without Monkey Patching