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!
25
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!
26
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!
27
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!
28
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!
29
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!
31
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!
32
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!
33
Volo.Abp.DistributedLocking.Abstractions
Package Description
23
Volo.Abp.DistributedLocking.Abstractions
Package Description
24
Volo.Abp.DistributedLocking.Abstractions
Package Description
25
Volo.Abp.DistributedLocking.Abstractions
Package Description
26
Volo.Abp.DistributedLocking.Abstractions
Package Description
27

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

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
7.1.8 3 11/27/2025
7.1.8-beta5 2 11/25/2025
7.1.8-beta4 3 11/26/2025
7.1.8-beta3 2 11/25/2025
7.1.8-beta2 2 11/26/2025
7.1.8-beta 3 11/26/2025
7.1.7 8 10/06/2025
7.1.6 22 04/14/2025
7.1.5-alpha 14 04/14/2025
7.1.4 24 12/02/2024
7.1.4-preview 22 11/30/2024
7.1.3 23 11/19/2024
7.0.2 26 11/25/2024
7.0.1 23 11/28/2024
7.0.0 24 11/21/2024
7.0.0-rc3 19 11/25/2024
7.0.0-rc2 21 11/28/2024
7.0.0-rc1 20 11/30/2024
7.0.0-beta 19 01/01/2025
7.0.0-alpha 26 11/25/2024
6.4.2 24 05/29/2024
6.4.1 28 05/29/2024
6.4.0 27 05/29/2024
6.3.4 33 05/29/2024
6.3.4-rc 30 05/29/2024
6.3.4-beta 22 05/31/2024
6.3.3 26 05/29/2024
6.3.2 24 05/29/2024
6.3.0 33 05/29/2024
6.2.6 23 05/29/2024
6.2.5 28 05/29/2024
6.2.4 28 05/29/2024
6.2.3 26 05/29/2024
6.2.3-beta 30 05/31/2024
6.2.2 29 05/29/2024
6.2.1 27 05/29/2024
6.2.0 26 05/29/2024
6.1.1 29 05/29/2024
6.1.1-rc 25 05/29/2024
6.1.1-beta 27 05/31/2024
6.1.0 29 05/29/2024
6.0.5 31 05/29/2024
6.0.5-alpha 24 05/29/2024
6.0.4 28 05/29/2024
6.0.4-rc6 26 05/29/2024
6.0.4-rc5 28 05/29/2024
6.0.4-rc3 25 05/29/2024
6.0.4-rc 26 05/29/2024
6.0.4-beta 23 05/31/2024
6.0.4-alpha 25 05/29/2024
6.0.3 28 11/28/2024
6.0.2 24 05/29/2024
6.0.1 27 05/29/2024
5.1.2 26 05/29/2024
5.1.1 28 05/29/2024
5.1.0 26 05/29/2024
5.0.4 26 05/29/2024
5.0.3 29 05/29/2024
5.0.3-rc 27 05/29/2024
5.0.2-rc 24 05/29/2024
5.0.1 22 11/27/2024
4.0.2 25 05/29/2024
3.2.3 27 05/29/2024
3.2.1 27 05/29/2024
3.2.0 31 05/29/2024
3.0.1 33 05/29/2024
3.0.0 29 05/29/2024
2.0.3 26 05/29/2024
2.0.2 28 05/29/2024
2.0.1 27 05/29/2024
2.0.0 24 05/29/2024
1.1.0 29 05/29/2024
1.0.1 29 05/29/2024
1.0.0 25 05/29/2024