C# enforcing order of statement execution

后端 未结 4 836
夕颜
夕颜 2021-02-13 15:15

My question is about order of execution guarantees in C# (and presumably .Net in general). I give Java examples I know something about to compare with.

For Java (from \"

4条回答
  •  孤独总比滥情好
    2021-02-13 15:17

    Without having read anything about .NET memory model, I can assure you .NET gives you at least those guarantees (i.e. lock behaves like an acquire an unlock like a release), since they are the weakest guarantees that are useful.

提交回复
热议问题