IEnumerable thread safety?

后端 未结 6 1239
我在风中等你
我在风中等你 2021-02-05 13:37

I have a main thread that populates a List. Further I create a chain of objects that will execute on different threads, requiring access to the List. The

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 14:22

    If you are using net framework 4.5 or greater, this could be a great soulution http://msdn.microsoft.com/en-us/library/dd997305(v=vs.110).aspx

    (microsoft already implemented a thread safe enumerable)

提交回复
热议问题