synchronization
A collection of async-friendly synchronization objects for .NET and .NET Core (by neosmart)
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. (by MarkCiliaVincenti)
synchronization | AsyncKeyedLock | |
---|---|---|
1 | 6 | |
2 | 138 | |
- | - | |
10.0 | 8.7 | |
almost 3 years ago | 23 days ago | |
C# | C# | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
synchronization
Posts with mentions or reviews of synchronization.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-20.
AsyncKeyedLock
Posts with mentions or reviews of AsyncKeyedLock.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-13.
-
AsyncKeyedLock: a library for locking based on a key
They're in the wiki at https://github.com/MarkCiliaVincenti/AsyncKeyedLock/wiki
-
Async/Multi Thread Design Question
You can take a look at AsyncKeyedLock, which will lock code according to the key it is given. The key you use can be anything, but should be unique to the mailbox.
-
SemaphoreSlim locking based on a key
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.
-
Keyed semaphore locks
I've updated the library to version 3.2.0 and updated the benchmarks using BenchmarkDotNet.
What are some alternatives?
When comparing synchronization and AsyncKeyedLock you can also consider the following projects:
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.
keyed-semaphores - 🔑🔒 Lock your c# threads by key
AsyncUtilities - A collection of somewhat useful utilities and extension methods for async programming
AsyncKeyedLockBenchmarks - Benchmarking keyed lockers
BatchPool - The one-stop generic task batching and management library