Thread Safety with Dictionary

后端 未结 3 971
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-13 20:23

If I have a

Dictionary myDic = new Dictionary
//Populate dictionary

One thread does

3条回答
  •  忘了有多久
    2021-02-13 20:41

    To improve your code, you might want to look up the ConcurrentDictionary class. It will solve some problems with multi-threading.

提交回复
热议问题