reisenberger / LockContentionBenchMark_Issue657

Benchmarks single-key-locking versus lock-per-key locking for a given Polly policy under consideration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LockContentionBenchmark_Issue657

This repo benchmarks single-key-locking versus lock-per-key locking for a potential ConcurrentDuplicateRequestCollapser Polly policy under consideration (issue 657).

The underlying implementation for that policy is a ConcurrentDictionary<string,Lazy<object>>.

While ConcurrentDictionary<,> uses its own internal striped-lock, the prototype implementation for ConcurrentDuplicateRequestCollapser involves locking over ConcurrentDictionary to support the use case of preventing concurrent duplicate requests via a distributed lock in Redis.

About

Benchmarks single-key-locking versus lock-per-key locking for a given Polly policy under consideration

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C# 100.0%