Rystem.Concurrency 10.0.1

dotnet add package Rystem.Concurrency --version 10.0.1
                    
NuGet\Install-Package Rystem.Concurrency -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rystem.Concurrency" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rystem.Concurrency" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Rystem.Concurrency" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rystem.Concurrency --version 10.0.1
                    
#r "nuget: Rystem.Concurrency, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rystem.Concurrency@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rystem.Concurrency&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Rystem.Concurrency&version=10.0.1
                    
Install as a Cake Tool

What is Rystem?

Concurrency

Async Lock

A lock keyword is used in C# to lock a memory address to have a sort of execution queue. But, unfortunately, you cannot use async methods in the lock statement. With async lock you also may have the lock behavior for your async methods. In DI you have to add the lock service

services.AddLock();

Inject ILock and use it

ILock locking = _serviceProvider.CreateScope().ServiceProvider.GetService<ILock>();
await locking!.ExecuteAsync(() => CountAsync(2), "SampleKey");

You have the method to execute, a key for more than one concurrent lock.

Race condition

First of all, you have to understand the race condition here In DI you have to add the lock service

services.AddRaceCondition();

Inject IRaceCodition and use it

 var raceCondition = _serviceProvider.CreateScope().ServiceProvider.GetService<IRaceCodition>();
 raceCondition!.ExecuteAsync(() => CountAsync(2), (i % 2).ToString(), TimeSpan.FromSeconds(2));

You have the method to execute, a key for more than one concurrent race, and a time span for time window, if you put 2 seconds, you block the execution of further methods for 2 seconds from when first method started.

ILockable

You can inject the ILockable interface for your purpose, like a distributed lock with Blob storage, or redis cache for instance.

services.AddLockableIntegration<BlobLockIntegration>();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Rystem.Concurrency:

Package Downloads
Rystem.Test.XUnit

Rystem is a open-source framework to improve the System namespace in .Net

Rystem.BackgroundJob

Rystem.

Rystem.Concurrency.Redis

Rystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 80,321 11/12/2025
9.1.3 391 9/2/2025
9.1.2 764,921 5/29/2025
9.1.1 97,943 5/2/2025
9.0.32 186,766 4/15/2025
9.0.31 5,872 4/2/2025
9.0.30 88,869 3/26/2025
9.0.29 9,055 3/18/2025
9.0.28 296 3/17/2025
9.0.27 275 3/16/2025
9.0.26 289 3/13/2025
9.0.25 52,145 3/9/2025
9.0.23 233 3/9/2025
9.0.21 755 3/6/2025
9.0.20 19,611 3/6/2025
9.0.19 363 3/6/2025
9.0.18 351 3/4/2025
9.0.17 247 3/1/2025
9.0.16 237 3/1/2025
9.0.15 75,609 2/22/2025
9.0.14 22,654 2/18/2025
9.0.13 250 2/9/2025
9.0.12 217,917 1/13/2025
9.0.11 24,083 1/9/2025
9.0.10 204 1/9/2025
9.0.9 4,097 1/7/2025
9.0.8 12,584 1/6/2025
9.0.7 240 1/6/2025
9.0.5 19,164 12/30/2024
9.0.4 92,401 12/23/2024
9.0.3 245 12/22/2024
9.0.2 10,793 12/21/2024
9.0.1 1,273 12/21/2024
9.0.0 173,121 11/16/2024
9.0.0-rc.1 155 10/18/2024
6.2.0 220,686 10/9/2024
6.1.1 270 10/9/2024
6.1.0 48,043 9/29/2024
6.0.24 324 9/11/2024
6.0.23 340,198 7/18/2024
6.0.21 300 6/18/2024
6.0.20 727,949 6/16/2024
6.0.19 30,537 6/14/2024
6.0.18 278 6/14/2024
6.0.17 291 6/14/2024
6.0.16 50,101 6/10/2024
6.0.15 298 6/9/2024
6.0.14 288 5/24/2024
6.0.13 274 5/23/2024
6.0.12 275 5/23/2024
6.0.11 273 5/20/2024
6.0.9 270 5/19/2024
6.0.7 250 5/18/2024
6.0.6 292 5/10/2024
6.0.5 279 5/10/2024
6.0.4 295 4/3/2024
6.0.3 1,704 3/25/2024
6.0.2 3,810 3/11/2024
6.0.1 263 3/8/2024
6.0.0 456 11/21/2023
6.0.0-rc.6 156 10/25/2023
6.0.0-rc.5 122 10/25/2023
6.0.0-rc.4 119 10/23/2023
6.0.0-rc.3 121 10/19/2023
6.0.0-rc.2 137 10/18/2023
6.0.0-rc.1 134 10/16/2023
5.0.20 626 9/25/2023
5.0.19 1,210 9/10/2023
5.0.18 459 9/6/2023
5.0.17 450 9/6/2023
5.0.16 425 9/5/2023
5.0.15 441 9/5/2023
5.0.14 459 9/5/2023
5.0.13 561 9/1/2023
5.0.12 422 8/31/2023
5.0.11 455 8/30/2023
5.0.10 460 8/29/2023
5.0.9 458 8/24/2023
5.0.8 457 8/24/2023
5.0.7 442 8/23/2023
5.0.6 439 8/21/2023
5.0.5 458 8/21/2023
5.0.4 471 8/16/2023
5.0.3 533 8/2/2023
5.0.2 487 8/2/2023
5.0.1 527 8/1/2023
5.0.0 520 7/31/2023
4.1.26 892 7/20/2023
4.1.25 496 7/16/2023
4.1.24 720 6/13/2023
4.1.23 537 6/13/2023
4.1.22 529 5/30/2023
4.1.21 548 5/20/2023
4.1.20 315,751 4/19/2023
4.1.19 95,330 3/20/2023
4.1.18 613 3/20/2023
4.1.17 616 3/16/2023
4.1.16 647 3/16/2023
4.1.15 1,081 3/15/2023
4.1.14 2,320 3/9/2023
4.1.13 657 3/7/2023
4.1.12 689 2/9/2023
4.1.11 706 1/26/2023
4.1.10 712 1/22/2023
4.1.9 709 1/20/2023
4.1.8 711 1/18/2023
4.1.7 738 1/18/2023
4.1.6 690 1/17/2023
4.1.1 671 1/4/2023
4.1.0 696 12/30/2022
3.0.25 890 12/21/2022
3.0.24 948 11/18/2022
3.0.23 926 11/18/2022
3.0.22 971 11/15/2022
3.0.21 954 11/14/2022
3.0.20 934 11/13/2022
3.0.19 968 11/2/2022
3.0.18 994 11/2/2022
3.0.17 1,016 10/29/2022
3.0.16 998 10/29/2022
3.0.15 1,015 10/29/2022
2.0.6 1,074 9/20/2022
2.0.5 1,347 9/20/2022
2.0.4 1,081 9/20/2022
2.0.3 624 9/20/2022
2.0.1 1,171 9/13/2022
2.0.0 982 8/19/2022
1.1.24 1,257 7/30/2022
1.1.23 1,100 7/29/2022
1.1.22 619 7/29/2022
1.1.21 1,084 7/29/2022
1.1.20 1,106 7/29/2022
1.1.19 1,148 7/27/2022
1.1.17 1,102 7/27/2022
1.1.16 653 7/26/2022
1.1.15 1,103 7/25/2022
1.1.14 1,119 7/25/2022
1.1.13 1,111 7/22/2022
1.1.12 1,104 7/19/2022
1.1.11 1,136 7/19/2022
1.1.10 1,109 7/19/2022
1.1.9 1,124 7/19/2022
1.1.8 1,122 7/18/2022
1.1.7 1,147 7/18/2022
1.1.6 1,113 7/18/2022
1.0.5 659 7/17/2022
1.0.4 1,119 7/17/2022
1.0.2 1,164 7/17/2022
1.0.1 618 7/12/2022
1.0.0 1,735 7/8/2022
0.10.7 1,185 7/8/2022
0.9.12 1,128 6/30/2022
0.9.11 1,090 6/29/2022
0.9.10 1,158 6/28/2022
0.9.9 648 6/27/2022