List<T>
is safe to read from multiple threads, but doesn't support writing at all. So you can execute multiple LINQ queries against the list so long as they don't make any changes. You could use ReaderWriterLockSlim
to obtain a write lock only for times where you need to write.
why doesn't the c# 4.0 have concurrent List?
I believe it's hard to create an implementation which keeps the same guarantees as List<T>
in terms of ordering, but is also thread-safe and efficient. The concurrent collections in .NET 4 are efficient, at the cost of some guarantees (such as ordering in the case of ConcurrentBag<T>
).