title: .NET - Dictionary locking vs. ConcurrentDictionary
body: <p>I couldn't find enough information on <code>ConcurrentDictionary</code> types, so I thought I'd ask about it here.</p>
  
  <p>Currently, I use a <code>Dictionary</code> to hold all users that is accessed constantly by multiple threads (from a thread pool, so no exact amount of threads), and it has synchronized access.</p>
  
  <p>I recently found out that there was a set of thread-safe collections in .NET 4.0, and it seems  to be very pleasing. I was wondering, what would be the 'more efficient and easier to manage' option, as I have the option between having a normal <code>Dictionary</code> with synchronized access, or have a <code>ConcurrentDictionary</code> which is already thread-safe.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/dd287191(VS.100).aspx" rel="noreferrer">Reference to .NET 4.0's <code>ConcurrentDictionary</code></a></p>