ConcurrencyChecker 1.0.0

The ConcurrencyChecker is an easy to use library that is used to find possible concurrency issues and async deadlocks in your code. Add this library to your unit and/or integration testing arsenal.

There is a newer version of this package available.
See the version list below for details.
Install-Package ConcurrencyChecker -Version 1.0.0
dotnet add package ConcurrencyChecker --version 1.0.0
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

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

Release Notes

This is the first official release of the ConcurrencyChecker library.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 762 7/7/2018
1.0.0 402 7/7/2018
0.0.12-beta 1,098 1/9/2018
0.0.11-beta 540 1/8/2018
0.0.10-beta 396 1/8/2018
0.0.9-beta 422 1/8/2018