AsyncKeyedLock 1.1.0

AsyncKeyedLock

An asynchronous .NET Standard 2.0 library that allows you to lock based on a key.

Installation

The recommended means is to use NuGet, but you could also download the source code from here.

Usage

using (var lockObj = await AsyncKeyedLocker.LockAsync(myObject))
{
	...
}

You can also set the maximum number of requests for the semaphore that can be granted concurrently (set to 1 by default):

AsyncKeyedLocker.MaxCount = 2;

If you would like to see how many concurrent requests there are for a semaphore for a given key:

int myCount = AsyncKeyedLocker.GetCount(myObject);

And if for some reason you need to force release the requests in the semaphore for a key:

AsyncKeyedLocker.ForceRelease(myObject);

Credits

This library is based on Stephen Cleary's solution.

Showing the top 20 packages that depend on AsyncKeyedLock.

Packages Downloads
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
11
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
9
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
8
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
7
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
6
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
5
EasyCaching.Core
EasyCaching is a open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
4

Allowed changing of max requests, getting request counts and force releasing locks.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
8.1.3 0 11/14/2026
8.1.3-preview 2 11/29/2026
8.1.2 7 10/03/2026
8.1.1 4 10/14/2026
8.0.2 11 07/10/2026
8.0.1 10 07/10/2026
8.0.0 11 07/11/2026
8.0.0-beta2 10 07/20/2026
8.0.0-beta 8 07/10/2026
7.1.8 13 07/10/2026
7.1.8-beta5 8 07/20/2026
7.1.8-beta4 7 07/20/2026
7.1.8-beta3 9 07/20/2026
7.1.8-beta2 9 07/10/2026
7.1.8-beta 5 07/19/2026
7.1.7 11 07/18/2026
7.1.6 8 07/10/2026
7.1.5-alpha 12 07/17/2026
7.1.4 6 07/19/2026
7.1.4-preview 9 07/20/2026
7.1.3 11 07/19/2026
7.0.2 14 07/10/2026
7.0.1 10 07/10/2026
7.0.0 13 07/10/2026
7.0.0-rc3 9 07/11/2026
7.0.0-rc2 8 07/11/2026
7.0.0-rc1 13 07/17/2026
7.0.0-beta 11 07/10/2026
7.0.0-alpha 11 07/10/2026
6.4.2 10 07/12/2026
6.4.1 9 07/12/2026
6.4.0 9 07/10/2026
6.3.4 11 07/11/2026
6.3.4-rc 11 07/10/2026
6.3.4-beta 17 07/10/2026
6.3.3 13 07/19/2026
6.3.2 10 07/11/2026
6.3.0 7 07/19/2026
6.2.6 8 07/10/2026
6.2.5 9 07/10/2026
6.2.4 6 07/10/2026
6.2.3 9 07/10/2026
6.2.3-beta 9 07/19/2026
6.2.2 8 07/11/2026
6.2.1 7 07/19/2026
6.2.0 5 07/19/2026
6.1.1 7 07/10/2026
6.1.1-rc 13 07/10/2026
6.1.1-beta 13 07/19/2026
6.1.0 7 07/10/2026
6.0.5 12 07/10/2026
6.0.5-alpha 8 07/10/2026
6.0.4 11 07/10/2026
6.0.4-rc6 7 07/10/2026
6.0.4-rc5 7 07/17/2026
6.0.4-rc3 13 07/12/2026
6.0.4-rc 6 07/10/2026
6.0.4-beta 17 07/10/2026
6.0.4-alpha 11 07/10/2026
6.0.3 9 07/10/2026
6.0.2 12 07/11/2026
6.0.1 11 07/12/2026
5.1.2 10 07/10/2026
5.1.1 9 07/19/2026
5.1.0 11 07/11/2026
5.0.4 7 07/10/2026
5.0.3 11 07/19/2026
5.0.3-rc 10 07/18/2026
5.0.2-rc 11 07/11/2026
5.0.1 10 07/10/2026
4.0.2 18 07/10/2026
3.2.3 19 07/19/2026
3.2.1 9 07/10/2026
3.2.0 13 07/11/2026
3.0.1 7 07/10/2026
3.0.0 10 07/19/2026
2.0.3 11 07/10/2026
2.0.2 12 07/10/2026
2.0.1 12 07/11/2026
2.0.0 9 07/19/2026
1.1.0 11 07/10/2026
1.0.1 11 07/10/2026
1.0.0 14 07/10/2026