Closed sklivvz closed 2 years ago
The only concern I have with this is that the dictionary in MultiKeyLock
is unbounded and there is no way to evict keys from it. Over time this dictionary could become a bottleneck if it gains a lot of entries (and can become a memory hog, as each ReaderWriterLockSlim
takes > 40 bytes).
Mentioning this as this class is used in long lived applications (the caches).
Changes
Major
Minor
Performance Improvements
Optimistic case
In this benchmark, the caches are always hit.
Before
After
Pessimistic case
In this benchmark, the caches are always missed.
Before
After