Use Volatile.Read/Write (SYSLIB0054)
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseVolatileReadWriteArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetReplace Thread.VolatileRead and Thread.VolatileWrite with Volatile.Read and Volatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).
Single recipecsharpdotnetthreadingProprietary
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.Migration.Dotnet.Net9.UseVolatileReadWriteIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet