Disable use of CAS when compiling with DISABLE_CAS_USE
authorMiguel de Icaza <miguel@gnome.org>
Wed, 26 Nov 2014 19:39:09 +0000 (14:39 -0500)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:07:39 +0000 (00:07 +0200)
mcs/class/referencesource/System/sys/system/collections/concurrent/ConcurrentBag.cs

index 807f01c45d285f651afdaafcde4bd336d9c9f84f..e93b41d2dac8652f92979b96dcc9a9f71f273828 100644 (file)
@@ -52,7 +52,7 @@ namespace System.Collections.Concurrent
     [ComVisible(false)]
     [DebuggerTypeProxy(typeof(SystemThreadingCollection_IProducerConsumerCollectionDebugView<>))]
     [DebuggerDisplay("Count = {Count}")]
-#if !FEATURE_NETCORE
+#if !(FEATURE_NETCORE || DISABLE_CAS_USE)
     [HostProtection(Synchronization = true, ExternalThreading = true)]
 #endif
     public class ConcurrentBag<T> : IProducerConsumerCollection<T>