ConcurrentDictionary over List 4
12/15/2018
In the previous post I have shown how we can use a new List with a ConcurrentDictionary
in a thread safe manner.In this post I will show to other methods, to achieve the same.
Immutable Structures
One way to make our intentions clearer is to use immutabe collections. One package is right away available: System.Collections.Immutable
Here is an implementation for the test class to be used. According to my testing the ImmutableArray
seems to be the immutable collection, that performs the fastest in this use cases I test.