List concurrent removing and adding

前端 未结 5 1131
渐次进展
渐次进展 2020-12-17 16:36

I am not too sure, so i thought i\'d ask. Would removing and adding items to a System.Collections.Generic.List<> object be non-thread safe?

My sit

5条回答
  •  感动是毒
    2020-12-17 17:14

    At the time of the question there wasn't .NET Framework 4 yet, but the people who are faced the problem now should try to use collections from System.Collections.Concurrent namespace for dealing with thread-safe issues

提交回复
热议问题