Fix race condition in Loader regression 523654 test
authorwtgodbe <wigodbe@microsoft.com>
Mon, 20 Jun 2016 22:21:44 +0000 (15:21 -0700)
committerwtgodbe <wigodbe@microsoft.com>
Mon, 20 Jun 2016 22:21:44 +0000 (15:21 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/27e1cdfe3fc50b5e9250ea5b4c7deec793b5f6b0

src/coreclr/tests/src/Loader/classloader/regressions/523654/test532654_b.cs

index d0f201f..860c2d6 100644 (file)
@@ -46,7 +46,7 @@ public class A
        public void meth<T>()
        {
                Console.WriteLine(Thread.CurrentThread.Name + ": Inside meth<int>");
-               ++i;
+        Interlocked.Increment(ref i);
        }
 }