ConcurrencyLab.ParallelChecker 2.6.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ConcurrencyLab.ParallelChecker --version 2.6.0                
NuGet\Install-Package ConcurrencyLab.ParallelChecker -Version 2.6.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="ConcurrencyLab.ParallelChecker" Version="2.6.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConcurrencyLab.ParallelChecker --version 2.6.0                
#r "nuget: ConcurrencyLab.ParallelChecker, 2.6.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 ConcurrencyLab.ParallelChecker as a Cake Addin
#addin nuget:?package=ConcurrencyLab.ParallelChecker&version=2.6.0

// Install ConcurrencyLab.ParallelChecker as a Cake Tool
#tool nuget:?package=ConcurrencyLab.ParallelChecker&version=2.6.0                

The Parallel Checker is a static analysis that detects data races, deadlocks and other concurrency issues in C#. The analysis is available as a NuGet package (e.g. for Visual Studio Code) and as a Visual Studio extension.

Visual Studio Code Integration

  1. Install the C# extension in Visual Studio Code, if not yet done.
  1. Menu "File"->"Preferences"->"Extensions"
  2. Search for "C# for Visual Studio Code (powered by Omnisharp)" and install it.
  1. Enable Roslyn analyzers in the setting.
  1. Menu "File"->"Preferences"->"Settings"
  2. Select "Extensions"->"C# configuration"
  3. Go to section "Omnisharp: Enable Roslyn Analyzers"
  4. Enable the option "Enable support for roslyn analyzers, code fixes and rulesets."
  1. Add the NuGet package "ConcurrencyLab.ParallelChecker" to the desired C# projects.
  1. Menu "Termin"-"New Terminal"
  2. Enter "dotnet add package ConcurrencyLab.ParallelChecker"
  1. Checker issues are displayed in the "problems" view and are also highlighted in the code
  1. Menu "View"->"Problems"
  1. If issues do not appear: Close and reopen the C# projects, wait for a moment, optionally run the project

Visual Studio Integration (VS 2022)

  1. Open Visual Studio
  2. Menu "Extensions"->"Manage Extensions"
  3. Search for "Parallel Checker for C# 10 (VS 2022)" and install it
  4. Close Visual Studio, follow the installer, and restart Visual Studio

More detailed instructions can be found at the VS Marketplace website of latest Parallel Checker.

Support for older VS 2019 is available at VS Marketplace website of Parallel Checker for VS 2019.

Concurrency Issues

The checker detects the following concurrency (multi-threading) issues with a static analysis, however, not necessarily all of them:

  • Data Races: Unsynchronized concurrent accesses to same variable or array element, involving at least a write.
  • Deadlocks: Constellations in which multiple threads block each other cyclically forever.
  • Thread-unsafe usage: Unsynchronized concurrent calls or accesses of application programming interfaces that are not specified to be thread safe.

The abovementioned issues are all fundamental programming bugs that can lead to program errors. These issues occur non-deterministically, possibly sporadically or very seldom. They are therefore hard to identify in tests and are not easily reproducible. For this reason, it makes sense to use a static analysis that examines various program traces, including very specific or seldom cases, as to whether they suffer from such issues.

Samples

As a first starting point, you can try the sample C# solutions to detect data races and deadlocks. You can download the samples from https://github.com/blaeser/parallelchecker/tree/main/doc/samples

How It Works

The checker is implemented based on the compiler framework Roslyn and analyzes the C# source code without executing the program, called static analysis. It screens as many interesting program traces as possible within defined deterministic bounds. The analysis maintains exact and complete context information for the program, where possible. Exceptions are e.g. external input/output and missing or incorrect source code parts, in which case conservative assumptions are made. The properties of the checker can be summarized as:

  • Precise: Real issues are reported without false positives (no false alarms), except when making conservative assumptions.
  • Incomplete: The checker may miss potential issues (possible false negatives) as there exists no precise and complete analysis.
  • Deterministic: The same issues are repeatedly reported for the same program.

The checker engages a new algorithm. It has been designed to efficiently deal with large software projects and find as many issues with high precision as possible.

More Information

You can find more information on the checker website https://github.com/blaeser/parallelchecker

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

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
2.7.0 21,772 12/11/2022
2.6.0 4,295 7/8/2022
2.4.0 958 5/2/2022
2.3.0 1,020 12/20/2021
2.2.0 1,272 11/5/2021
2.0.0 1,000 8/3/2021
1.9.0 1,032 5/26/2021 1.9.0 is deprecated because it is no longer maintained.
1.8.0 1,167 2/5/2021 1.8.0 is deprecated because it is no longer maintained.