ConcurrencyChecker 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ConcurrencyChecker --version 1.0.0
NuGet\Install-Package ConcurrencyChecker -Version 1.0.0
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="ConcurrencyChecker" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConcurrencyChecker --version 1.0.0
#r "nuget: ConcurrencyChecker, 1.0.0"
#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.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.