Rystem.Concurrency 9.0.32

dotnet add package Rystem.Concurrency --version 9.0.32
                    
NuGet\Install-Package Rystem.Concurrency -Version 9.0.32
                    
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="9.0.32" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rystem.Concurrency" Version="9.0.32" />
                    
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 9.0.32
                    
#r "nuget: Rystem.Concurrency, 9.0.32"
                    
#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.
#addin nuget:?package=Rystem.Concurrency&version=9.0.32
                    
Install Rystem.Concurrency as a Cake Addin
#tool nuget:?package=Rystem.Concurrency&version=9.0.32
                    
Install Rystem.Concurrency 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 net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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
9.0.32 36,602 6 days ago
9.0.31 5,748 20 days ago
9.0.30 88,743 a month ago
9.0.29 8,936 a month ago
9.0.28 174 a month ago
9.0.27 165 a month ago
9.0.26 175 a month ago
9.0.25 52,029 a month ago
9.0.23 132 a month ago
9.0.21 476 2 months ago
9.0.20 19,499 2 months ago
9.0.19 239 2 months ago
9.0.18 233 2 months ago
9.0.17 128 2 months ago
9.0.16 122 2 months ago
9.0.15 75,486 2 months ago
9.0.14 22,532 2 months ago
9.0.13 141 2 months ago
9.0.12 217,806 3 months ago
9.0.11 23,970 3 months ago
9.0.10 95 3 months ago
9.0.9 3,984 3 months ago
9.0.8 12,467 3 months ago
9.0.7 118 4 months ago
9.0.5 19,069 4 months ago
9.0.4 92,284 4 months ago
9.0.3 130 4 months ago
9.0.2 10,683 4 months ago
9.0.1 1,170 4 months ago
9.0.0 173,000 5 months ago
9.0.0-rc.1 105 6 months ago
6.2.0 219,734 6 months ago
6.1.1 148 6 months ago
6.1.0 47,925 7 months ago
6.0.24 201 7 months ago
6.0.23 340,079 9 months ago
6.0.21 178 6/18/2024
6.0.20 727,828 6/16/2024
6.0.19 30,416 6/14/2024
6.0.18 159 6/14/2024
6.0.17 172 6/14/2024
6.0.16 49,998 6/10/2024
6.0.15 171 6/9/2024
6.0.14 179 5/24/2024
6.0.13 160 5/23/2024
6.0.12 156 5/23/2024
6.0.11 163 5/20/2024
6.0.9 158 5/19/2024
6.0.7 140 5/18/2024
6.0.6 164 5/10/2024
6.0.5 164 5/10/2024
6.0.4 185 4/3/2024
6.0.3 1,581 3/25/2024
6.0.2 3,397 3/11/2024
6.0.1 147 3/8/2024
6.0.0 387 11/21/2023
6.0.0-rc.6 118 10/25/2023
6.0.0-rc.5 86 10/25/2023
6.0.0-rc.4 82 10/23/2023
6.0.0-rc.3 80 10/19/2023
6.0.0-rc.2 89 10/18/2023
6.0.0-rc.1 90 10/16/2023
5.0.20 545 9/25/2023
5.0.19 1,127 9/10/2023
5.0.18 374 9/6/2023
5.0.17 354 9/6/2023
5.0.16 333 9/5/2023
5.0.15 345 9/5/2023
5.0.14 352 9/5/2023
5.0.13 464 9/1/2023
5.0.12 325 8/31/2023
5.0.11 355 8/30/2023
5.0.10 357 8/29/2023
5.0.9 355 8/24/2023
5.0.8 347 8/24/2023
5.0.7 343 8/23/2023
5.0.6 343 8/21/2023
5.0.5 362 8/21/2023
5.0.4 374 8/16/2023
5.0.3 430 8/2/2023
5.0.2 380 8/2/2023
5.0.1 419 8/1/2023
5.0.0 411 7/31/2023
4.1.26 752 7/20/2023
4.1.25 391 7/16/2023
4.1.24 602 6/13/2023
4.1.23 415 6/13/2023
4.1.22 411 5/30/2023
4.1.21 424 5/20/2023
4.1.20 315,622 4/19/2023
4.1.19 95,208 3/20/2023
4.1.18 497 3/20/2023
4.1.17 494 3/16/2023
4.1.16 523 3/16/2023
4.1.15 957 3/15/2023
4.1.14 2,197 3/9/2023
4.1.13 526 3/7/2023
4.1.12 560 2/9/2023
4.1.11 573 1/26/2023
4.1.10 577 1/22/2023
4.1.9 586 1/20/2023
4.1.8 584 1/18/2023
4.1.7 609 1/18/2023
4.1.6 571 1/17/2023
4.1.1 556 1/4/2023
4.1.0 571 12/30/2022
3.0.25 752 12/21/2022
3.0.24 817 11/18/2022
3.0.23 791 11/18/2022
3.0.22 835 11/15/2022
3.0.21 822 11/14/2022
3.0.20 791 11/13/2022
3.0.19 831 11/2/2022
3.0.18 853 11/2/2022
3.0.17 873 10/29/2022
3.0.16 873 10/29/2022
3.0.15 886 10/29/2022
2.0.6 937 9/20/2022
2.0.5 1,196 9/20/2022
2.0.4 941 9/20/2022
2.0.3 514 9/20/2022
2.0.1 1,022 9/13/2022
2.0.0 854 8/19/2022
1.1.24 1,100 7/30/2022
1.1.23 957 7/29/2022
1.1.22 501 7/29/2022
1.1.21 932 7/29/2022
1.1.20 968 7/29/2022
1.1.19 1,004 7/27/2022
1.1.17 957 7/27/2022
1.1.16 519 7/26/2022
1.1.15 968 7/25/2022
1.1.14 975 7/25/2022
1.1.13 960 7/22/2022
1.1.12 957 7/19/2022
1.1.11 991 7/19/2022
1.1.10 975 7/19/2022
1.1.9 984 7/19/2022
1.1.8 979 7/18/2022
1.1.7 996 7/18/2022
1.1.6 978 7/18/2022
1.0.5 539 7/17/2022
1.0.4 970 7/17/2022
1.0.2 1,024 7/17/2022
1.0.1 500 7/12/2022
1.0.0 1,551 7/8/2022
0.10.7 1,044 7/8/2022
0.9.12 980 6/30/2022
0.9.11 945 6/29/2022
0.9.10 1,005 6/28/2022
0.9.9 527 6/27/2022