Simple question
Assume that i have a ConcurrentDictionary
I use TryAdd
and ContainsKey
methods
Now assume that from 100 threads i started to process stuff. Assume that when 3 threads while adding a new key with TryAdd
method another 3 threads asking whether key exists or not with ContainsKey
method
Do ContainsKey
wait those 3 threads adding process before returning me result ?
Or they are not synched i mean that one of those 3 threads could be adding the key i am asking with ContainsKey method however since the process is not done yet the answer i was gonna get would be false
Ty very much for answers C# WPF .net 4.5 Latest