I originally thought that using a ConcurrentDictionary would mitigate from the concurrency issue, as outlined in issue #238. But that doesn't appear to be the case. I'm not sure why we'd want to use a ConcurrentDictionary if it's not working as expected - which, is most likely due to my understanding of how it actually works. This patch changes from using ConcurrentDictionary to a regular generic Dictionary, adding locks to prevent concurrently issues between reads/writes.
Second attempt to fix #238
I originally thought that using a
ConcurrentDictionary
would mitigate from the concurrency issue, as outlined in issue #238. But that doesn't appear to be the case. I'm not sure why we'd want to use aConcurrentDictionary
if it's not working as expected - which, is most likely due to my understanding of how it actually works. This patch changes from usingConcurrentDictionary
to a regular genericDictionary
, adding locks to prevent concurrently issues between reads/writes.