ConcurrencyChecker 1.0.0
See the version list below for details.
dotnet add package ConcurrencyChecker --version 1.0.0
NuGet\Install-Package ConcurrencyChecker -Version 1.0.0
<PackageReference Include="ConcurrencyChecker" Version="1.0.0" />
paket add ConcurrencyChecker --version 1.0.0
#r "nuget: ConcurrencyChecker, 1.0.0"
// Install ConcurrencyChecker as a Cake Addin
#addin nuget:?package=ConcurrencyChecker&version=1.0.0
// Install ConcurrencyChecker as a Cake Tool
#tool nuget:?package=ConcurrencyChecker&version=1.0.0
Concurrency Checker
Introduction
The ConcurrencyChecker is an easy to use library which can be used to firstly identify concurrency problems in your code and secondly to ensure that no future developer uses your code in an unsafe way.
For some people the 'How to' section will be a good place to start, but for most a code sample is worth a thousand words. Please find such a sample with explanation in the 'Tutorial' section.
Available on NuGet: https://www.nuget.org/packages/ConcurrencyChecker
Features
The ConcurrencyChecker will do the following checks:
- async/await deadlocks
- concurency issues such as:
- thread safety
- state changes
- race conditions
- deadlocks
Which classes to check
Run the ConcurrencyChecker as an additional test on any class which should handle multiple concurrent threads accessing the SAME instance.
These cases are and also not limited to:
- Singletons
- Shared classes when using dependency injection frameworks
- Classes with static methods, properties or fields
- Instances reused accross threads/requests
- Third party libraries
Use the async deadlock checking to make sure:
- Your async library will not deadlock if called synchronously for resiliency
- Test 3rd party libraries for deadlocks
- Troubleshooting async deadlocks
About the ConcurrencyChecker
This library was created after our development team experienced a concurrency bug which was live for several months before it was picked up.
After writing all of the unit tests to simulate the problem, I had the idea to change the tests into a generic library that can be used by other projects and teams.
Still the best way to avoid and find problems is by implementing good programming practices and code reviews!
Github repository
https://github.com/chriscdev/ConcurrencyChecker
License
This project is licensed under the MIT License - see the License.md file for details
Contact
Please feel free to drop me a mail at chrisc.development@gmail.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Newtonsoft.Json (>= 6.0.8)
- Nito.AsyncEx.Context (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 1,440 | 7/7/2018 |
1.0.0 | 962 | 7/7/2018 |
0.0.12-beta | 3,491 | 1/9/2018 |
0.0.11-beta | 1,093 | 1/8/2018 |
0.0.10-beta | 826 | 1/8/2018 |
0.0.9-beta | 832 | 1/8/2018 |
This is the first official release of the ConcurrencyChecker library.