Engineering Publications
Technical Insights & Architecture Papers
Deep-dives on high-throughput backend architecture, Python & Django performance, real-time Voice AI, and resilient database modeling.
Python contextvars Across ASGI Threadpools: Debugging Token Context Mismatches in Streaming Generators and Async Workers
Why calling ContextVar.reset(token) inside a synchronous FastAPI/Starlette StreamingResponse generator raises 'ValueError: <Token ...> was created in a different Context'—and how to build threadpool-safe context propagation for LLM streaming.