AspNetSynchronizationContext

Onefdiere

New Member
Trying to use new C# 5 async model it was surprising to me \[code\]AspNetSynchronizationContext\[/code\] is an internal class (as well as \[code\]AspNetSynchronizationContextBase\[/code\] base). Thus undocumented. But it's essential to know what it does when utilizing async/await feature within your ASP.NET code. Am I correct thatIt does guarantee your continuations will get the same \[code\]HttpContext.Current\[/code\] as original callers?It does not guarantee the continuations will execute on the same thread as the callers?If the latter assumption is not true and I get the original thread can I be sure to get the same thread context in continuations? I mean principal/culture associated with the thread and thread local storage?
 
Back
Top