Use Volatile.Read/Write (SYSLIB0054)

Proprietary

Replace Thread.VolatileRead and Thread.VolatileWrite with Volatile.Read and Volatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseVolatileReadWrite
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseVolatileReadWrite

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.