diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-12-03 21:19:51 +0300 |
---|---|---|
committer | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-12-03 21:19:51 +0300 |
commit | bc876c24271684c27aa793f82cf5cdbc9c3a82e2 (patch) | |
tree | 28d62ea76723d80db474a81b1779a3d7cea66857 /mcs/class/System.Web.Mvc3 | |
parent | aec3ef0e8ebee2acf54f454cfeff22c9a7577664 (diff) |
[bcl] Remove all uses of Thread.Volatile{Read,Write}.
These methods are broken, misleading, and generally harmful. Always prefer the
`Volatile` class over these to make intent clear and to get sensible semantics.
http://blog.alexrp.com/2014/03/30/dot-net-atomics-and-memory-model-semantics/
Diffstat (limited to 'mcs/class/System.Web.Mvc3')
-rw-r--r-- | mcs/class/System.Web.Mvc3/Mvc/Async/OperationCounter.cs | 2 | ||||
-rw-r--r-- | mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/mcs/class/System.Web.Mvc3/Mvc/Async/OperationCounter.cs b/mcs/class/System.Web.Mvc3/Mvc/Async/OperationCounter.cs index 5c8e5e5cfee..2c282ce28f5 100644 --- a/mcs/class/System.Web.Mvc3/Mvc/Async/OperationCounter.cs +++ b/mcs/class/System.Web.Mvc3/Mvc/Async/OperationCounter.cs @@ -8,7 +8,7 @@ public int Count { get { - return Thread.VolatileRead(ref _count); + return Volatile.Read(ref _count); } } diff --git a/mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources b/mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources index d65c2ff8989..bc649b13c04 100644 --- a/mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources +++ b/mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources @@ -1,3 +1,5 @@ +../corlib/System.Threading/Volatile.cs + ./GlobalSuppressions.cs ./GlobalAssemblyInfo.cs ./Mvc/AcceptVerbsAttribute.cs |