Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alexrp@xamarin.com>2014-12-03 21:19:51 +0300
committerAlex Rønne Petersen <alexrp@xamarin.com>2014-12-03 21:19:51 +0300
commitbc876c24271684c27aa793f82cf5cdbc9c3a82e2 (patch)
tree28d62ea76723d80db474a81b1779a3d7cea66857 /mcs/class/System.Web.Mvc3
parentaec3ef0e8ebee2acf54f454cfeff22c9a7577664 (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.cs2
-rw-r--r--mcs/class/System.Web.Mvc3/System.Web.Mvc3.dll.sources2
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