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

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgorBo <egorbo@gmail.com>2018-04-05 13:18:48 +0300
committerMarek Safar <marek.safar@gmail.com>2018-04-05 14:01:29 +0300
commit26f940bbc4c6703d5ae5f3f626f505b8211e834e (patch)
treefd13756af42f9ce3fcbe9c55790aee522763e0c4
parent2b3a7ff02e349d36983d9c32c1de2b8f7b6e8da0 (diff)
Add `using System.Diagnostics.Private;` to Task-related sources
-rw-r--r--src/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs3
-rw-r--r--src/System.Private.CoreLib/src/System/Threading/Tasks/TaskExceptionHolder.cs1
-rw-r--r--src/System.Private.Interop/src/InteropExtensions/Lock.cs2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index f7fbbac7b..7c155523e 100644
--- a/src/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/src/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -17,6 +17,7 @@
using System.Collections.Generic;
using System.Diagnostics;
+using System.Diagnostics.Private;
using System.Diagnostics.CodeAnalysis;
namespace System.Threading.Tasks
@@ -712,7 +713,9 @@ namespace System.Threading.Tasks
private static void ContractAssertMonitorStatus(Lock syncObj, bool held)
{
Debug.Assert(syncObj != null, "The Lock object to check must be provided.");
+#if !MONO
Debug.Assert(syncObj.IsAcquired == held, "The locking scheme was not correctly followed.");
+#endif
}
/// <summary>Gets the options to use for tasks.</summary>
diff --git a/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskExceptionHolder.cs b/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskExceptionHolder.cs
index f06b0750c..e915f3595 100644
--- a/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskExceptionHolder.cs
+++ b/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskExceptionHolder.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
+using System.Diagnostics.Private;
using System.Runtime.ExceptionServices;
namespace System.Threading.Tasks
diff --git a/src/System.Private.Interop/src/InteropExtensions/Lock.cs b/src/System.Private.Interop/src/InteropExtensions/Lock.cs
index d86c28f12..e252ea985 100644
--- a/src/System.Private.Interop/src/InteropExtensions/Lock.cs
+++ b/src/System.Private.Interop/src/InteropExtensions/Lock.cs
@@ -10,7 +10,7 @@ namespace System.Threading
/// Simple wrapper around Monitor.Enter and Exit exposing interface as expected by
/// System.Private.InteropServices.__ComObject
/// </summary>
- public class Lock
+ public partial class Lock
{
private object _lock = new object();
public void Acquire()