Use Volatile.Read/Write (SYSLIB0054)
ProprietaryReplace 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. UseVolatileReadWritemod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. UseVolatileReadWriteInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.