I’ve never used the ConcurrentDictionary object before and have a couple questions about it:
-
Am I correct that multiple threads can read from the dictionary at the same time, but if it’s being written to, no other thread can access it?
-
Can this object be serialized to disk?
Thanks.
No, you can safely read and write from multiple threads. Of course internally I suppose that there is some synchronization happening but the performance penalty should be small and you shouldn’t be worried about it and do any additional synchronization.
Depends on what serializer you use.
XmlSerializeris allergic to theIDictionary<TKey, TValue>interface)