-
AsyncKeyedLock
An asynchronous .NET Standard 2.0 library that allows you to lock based on a key (keyed semaphores), limiting concurrent threads sharing the same key to a specified number, with optional pooling for reducing memory allocations.
-
OpenWeatherMap.Cache
An asynchronous .NET Standard 2.0 library that allows you to fetch & cache current weather readings from the OpenWeather API, with built-in resiliency that can extend the cache lifetime in case the API is unreachable.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Suppose you were processing financial transactions, but while working on one account you wouldn't want to concurrently process a transaction for the same account. Of course, you could just add a normal lock, but then you can only process one transaction at a time. If you're processing a transaction for account A, you may want to also be processing a separate transaction for account B. I have written a library called `AsyncKeyedLock` at https://github.com/MarkCiliaVincenti/AsyncKeyedLock to tackle this common problem. I had previously posted about it at https://www.reddit.com/r/dotnet/comments/y742i7/keyed_semaphore_locks/ and took a lot of feedback on board and completely rewritten it.
It doesn't need to be related to finance or databases. Could be related to physical file access, doing operations on UDP packets received, limiting API requests (eg trying to get weather for a location concurrently doesn't make sense, so wait for the result of the ongoing one and provide the result to the second one, that's what I'm using in https://github.com/MarkCiliaVincenti/OpenWeatherMap.Cache). I'm sure you can be creative and think of plenty of other use cases.