Do ASP.NET developers really need to be concerned with thread safety?

前端 未结 4 1384
陌清茗
陌清茗 2021-02-01 20:24

I consider myself aware of the concepts of threading and why certain code is or isn’t “thread-safe,” but as someone who primarily works with ASP.NET, threading and thread safety

4条回答
  •  佛祖请我去吃肉
    2021-02-01 20:47

    I believe you covered it all very well. I agree with you. Being focused on ASP.NET only it rarely (if at all) comes to multi-threading issues.

    The situation changes however when it comes to optimizations. Whenever your start a long-lasting query, you may often want to let it run in a separate thread so that the page load does not stop until the server reports connection timeout. You may wish to have this page periodically check for completion status to notify the user. Here where it comes to multi-threading issues.

提交回复
热议问题