Whether or not it is safe to modify the item is entirely independent on whether or not it is in a ConcurrentDictionary
. That's no different than just having a list that you mutate from two different threads. In the case of List
, it's not safe; if you use a type that is designed to be mutated from multiple different threads, such as a ConcurrentDictionary<string, ConcurrentQueue<int>>
then that would be fine.
ConcurrentQueue
is only ensuring that calls to methods of that class are observed to be atomic; it is making no other guarantees surrounding thread safety.