This happens when you are adding data to the Dictionary<TKey, TValue> from multiple threads, the underlying implementation is using arrays.
To solve, switch to use ConcurrentDictionary, and use GetOrAdd.
Bruce Ng's software development blog
An archive of solutions of programming problems I have faced in my career
This happens when you are adding data to the Dictionary<TKey, TValue> from multiple threads, the underlying implementation is using arrays.
To solve, switch to use ConcurrentDictionary, and use GetOrAdd.