The new System.Collections.Concurrent Namespace

July 20th, 2010 by jason Leave a reply »

I just stumbled across the new System.Collections.Concurrent Namespace in .Net 4.0.  I needed a thread safe dictionary and a coworker suggested I check out ConcurrentDictionary.  Of course if you are attempting multiple operations against the dictionary you still need to lock or use some other type of mutex.  But if all you are doing is reading a writing from multiple threads in single, atomic statements then this is the critter for you.

Advertisement

Leave a Reply

You must be logged in to post a comment.