I need a dictionary/hashmap in c# that allow you to do the following
- put values and iterate at the same time without a lock
- lock only put. get are not locked and you may get many times concurrently
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have a look at the ConcurrentDictionary here: http://msdn.microsoft.com/en-us/library/dd287191.aspx. This should do what you’re looking for. Keep in mind, it’s .Net 4 only.