I have a HashTable which is accessed by multiple threads. For example lets look at three threads:
Thread A does Hash.Insert("a",new object());
Thread B does Hash.Insert("b",new object());
Thread C does Hash.Insert("a",new object());
For some reasons, I cannot use a Lock on the entire Hash
I dont care about the order or which object will be at the hash at the end of the process. The only thing I care about is not getting data corruption by updating the same cell from different threads.
What are my options? or is it not a problem and the HashTable handles that by itself and keeps the data in tact.