C#: How to Toggle value of integer in a thread-safe way?

后端 未结 0 1460
心在旅途
心在旅途 2020-12-06 03:36

I want to have a static boolean variable that can be altered by any of the threads based on the response of a remote API. What is a thread-safe way that one would recommend

相关标签:
回答
  • 消灭零回复
提交回复
热议问题