← All recipes
Moderne licensed

Find blocking calls in async methods

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindBlockingCallsInAsyncArtifactOpenRewrite.Recipes.CSharp.CodeQuality

Detect .Wait(), .Result, and .GetAwaiter().GetResult() calls in async methods. Blocking calls in async methods can cause deadlocks.

Single recipecsharpperformancecode-qualityProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindBlockingCallsInAsync

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality