Static Function Concurrency ASP.NET

后端 未结 7 1379
遇见更好的自我
遇见更好的自我 2021-02-09 19:14

If you have two threads invoking a static function at the same moment in time, is there a concurrency risk? And if that function uses a static member of the class, is there even

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-09 19:56

    If the scope of the variables is contained within the static function then there is no risk, but variables outside of the function scope (static / shared) DEFINITLY pose a concurrency risk

提交回复
热议问题