C#C
C#3y ago
Ruttie

❔ ThreadStatic for tasks

I need something that acts like ThreadStatic, but for async/await code.
In my case, I need to set a context value.
For example, in ASP.NET I want to set the HttpContext to have a value I want to access later, but only from this task and its children.
How might I do this?
Was this page helpful?