While ConcurrentDictionaryRepository offers a thread safe IThrottleRepository implementation the ThrottlingCore always acquires lock before using the IThrottleRepository. Thus obviating the need for thread safe implementation.
ThrottlingCore.cs line:198
lock (ProcessLocker)
{
var entry = Repository.FirstOrDefault(id);
// Code here
// stores: id (string) - timestamp (datetime) - total (long)
Repository.Save(id, throttleCounter, timeSpan);
}`
@stefanprodan: Doesn't this defeat the purpose of having a ConcurrentDictionaryRepository which is to remove the bottle neck where all requests are made to wait for the lock.
While ConcurrentDictionaryRepository offers a thread safe IThrottleRepository implementation the ThrottlingCore always acquires lock before using the IThrottleRepository. Thus obviating the need for thread safe implementation. ThrottlingCore.cs line:198
@stefanprodan: Doesn't this defeat the purpose of having a ConcurrentDictionaryRepository which is to remove the bottle neck where all requests are made to wait for the lock.