Closed shadow-cs closed 5 years ago
Just saw this PR after experiencing the same issue. Another alternative to switching to ConcurrentDictionary for a use case which will be, after an initial set of requests, primarily read only, is to use a regular dictionary with a clone+swap model for modifications. A lock can be used during the clone+swap, double checking after acquisition (i.e., double-checked locking) before cloning. Just throwing an alternative out there.
Hi, I haven't forgotten about this. I keep meaning to make a proof of concept just to actively make sure I wasn't imagining things about TryAdd/AddOrUodate having concurrency problems.
Followup @Inumedia after about three weeks in production I have zero issues with initialization, it looks like the issue is indeed fixed.
Closes #189