CallContext vs ThreadStatic

前端 未结 2 833
情歌与酒
情歌与酒 2020-11-29 02:31

What are differences between CallContext and ThreadStatic?

I\'ve understood that in an ASP.NET environment data stored in CallContext could be persisted throughout t

2条回答
  •  臣服心动
    2020-11-29 03:12

    Very often a request will use the same thread throughout, but it certainly won't always be the case - ASP.NET exhibits thread agility. There's an old in-depth blog article about the matter from 2005, but as of .NET 4.5 things are rather better.

提交回复
热议问题