ConcurrencyLab.ParallelChecker
2.4.0
See the version list below for details.
dotnet add package ConcurrencyLab.ParallelChecker --version 2.4.0
NuGet\Install-Package ConcurrencyLab.ParallelChecker -Version 2.4.0
<PackageReference Include="ConcurrencyLab.ParallelChecker" Version="2.4.0" />
paket add ConcurrencyLab.ParallelChecker --version 2.4.0
#r "nuget: ConcurrencyLab.ParallelChecker, 2.4.0"
// Install ConcurrencyLab.ParallelChecker as a Cake Addin #addin nuget:?package=ConcurrencyLab.ParallelChecker&version=2.4.0 // Install ConcurrencyLab.ParallelChecker as a Cake Tool #tool nuget:?package=ConcurrencyLab.ParallelChecker&version=2.4.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
- Install the C# extension in Visual Studio Code, if not yet done.
- Menu "File"->"Preferences"->"Extensions"
- Search for "C# for Visual Studio Code (powered by Omnisharp)" and install it.
- Enable Roslyn analyzers in the setting.
- Menu "File"->"Preferences"->"Settings"
- Select "Extensions"->"C# configuration"
- Go to section "Omnisharp: Enable Roslyn Analyzers"
- Enable the option "Enable support for roslyn analyzers, code fixes and rulesets."
- Add the NuGet package "ConcurrencyLab.ParallelChecker" to the desired C# projects.
- Menu "Termin"-"New Terminal"
- Enter "dotnet add package ConcurrencyLab.ParallelChecker"
- Checker issues are displayed in the "problems" view and are also highlighted in the code
- Menu "View"->"Problems"
- If issues do not appear: Close and reopen the C# projects, wait for a moment, optionally run the project
Visual Studio Integration (VS 2022)
- Open Visual Studio
- Menu "Extensions"->"Manage Extensions"
- Search for "Parallel Checker for C# 10 (VS 2022)" and install it
- 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://parallel-checker.com/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://parallel-checker.com
Product | Versions 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. |
-
.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.