Hi there! I am still slowly reading this book:
Today I reached a page where the book is explaining about collections. Among the types of collections available, I am intrigued that there is a namespace called System.Collections.Concurrent. Apparently, .NET now has a number of collection types under this namespace:
Then I found out that it has been around since 2010!
It was introduced together with .NET 4, God darn it! It does make me feel like I’ve been living under a rock. I could have been using these classes instead of manually locking and waiting in my past projects. So in my attempt to catch up, these articles helped me to quickly understand these Concurrent Classes:
- ConcurrentBag<T> used to be slow, but Microsoft has fixed this
- When to use the new Concurrent Classes, and when to resort back to the classic manual locking and waiting
- Good introduction to Concurrent Classes
- Microsoft’s White Paper on the performance of Concurrent Classes
- Understanding what happen under ConcurrentBag<T>
That’s it for now. I’ll post more on this subject as I explore on their usage in real-life scenario.