Why is List not thread-safe?

前端 未结 6 1561
醉梦人生
醉梦人生 2020-12-04 15:28

From the following site:

http://crfdesign.net/programming/top-10-differences-between-java-and-c

Unfortunately, List<> is no

6条回答
  •  一向
    一向 (楼主)
    2020-12-04 16:11

    For true thread safety, List<> and other collection types would need to be immutable. With the parallel extensions to .NET coming out in .NET 4.0 we'll be seeing thread safe versions of the most commonly used collections. Jon Skeet touches on some of this.

提交回复
热议问题