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

前端 未结 4 1380
陌清茗
陌清茗 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:25

    There are certain objects in addition to static items that are shared across all requests to an application. Be careful about putting items in the application cache that are not thread-safe, for example. Also, nothing prevents you from spawning your own threads for background processing while handling a request.

提交回复
热议问题