Invisible race conditions: The cache has poisoned us

added by DotNetKicks
1/2/2018 1:16:14 PM

2 Kicks, 268 Views

As you can see, we are looking at a loop that may be executed several times, as such the updateValueFactory can be called several times, and the only guarantee we have is that after the method has returned, the last value we were called with was the value that was in the cache and we replaced.