Thread safety in C# arrays

后端 未结 3 821
隐瞒了意图╮
隐瞒了意图╮ 2020-12-17 17:01

Does having 2 different threads :

  • one reading from a C# array (e.g from first location),
  • and another one writing to the same C# array but t
3条回答
  •  情书的邮戳
    2020-12-17 17:47

    Long story short: Yes. As long as its to two different locations, its a safe operation.

    There was a discussion about this awhile ago, it has some useful information if you're curious.

提交回复
热议问题