You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.69
Former-commit-id: fc39669a0b707dd3c063977486506b6793da2890
This commit is contained in:
parent
d8f8abd549
commit
e2950ec768
@@ -43,9 +43,9 @@ namespace System
|
||||
}
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct AsyncTaskMethodBuilder
|
||||
{
|
||||
private object _dummy;
|
||||
public System.Threading.Tasks.Task Task { get { throw null; } }
|
||||
public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
@@ -55,9 +55,9 @@ namespace System.Runtime.CompilerServices
|
||||
public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) { }
|
||||
public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct AsyncTaskMethodBuilder<TResult>
|
||||
{
|
||||
private System.Threading.Tasks.Task<TResult> _dummy;
|
||||
public System.Threading.Tasks.Task<TResult> Task { get { throw null; } }
|
||||
public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
@@ -67,9 +67,9 @@ namespace System.Runtime.CompilerServices
|
||||
public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) { }
|
||||
public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct AsyncVoidMethodBuilder
|
||||
{
|
||||
private object _dummy;
|
||||
public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
|
||||
public static System.Runtime.CompilerServices.AsyncVoidMethodBuilder Create() { throw null; }
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<AssemblyName>System.Threading.Tasks</AssemblyName>
|
||||
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the configurations -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace System.Threading.Tasks.Tests
|
||||
}
|
||||
|
||||
|
||||
[SecurityCritical]
|
||||
protected override void QueueTask(Task task)
|
||||
{
|
||||
if (task == null) throw new ArgumentNullException("When requesting to QueueTask, the input task can not be null");
|
||||
@@ -52,13 +51,11 @@ namespace System.Threading.Tasks.Tests
|
||||
}, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
|
||||
}
|
||||
|
||||
[SecuritySafeCritical] //This has to be SecuritySafeCritical since its accesses TaskScheduler.TryExecuteTask (which is safecritical)
|
||||
private void ExecuteTask(Task task)
|
||||
{
|
||||
base.TryExecuteTask(task);
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
|
||||
{
|
||||
if (taskWasPreviouslyQueued) return false;
|
||||
@@ -72,7 +69,6 @@ namespace System.Threading.Tasks.Tests
|
||||
// set;
|
||||
//}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override IEnumerable<Task> GetScheduledTasks() { return null; }
|
||||
private Object _lockObj = new Object();
|
||||
private int _counter = 1; //This is used to keep track of how many scheduler tasks were created
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{B6C09633-D161-499A-8FE1-46B2D53A16E7}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the configurations -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
|
||||
@@ -58,4 +57,4 @@
|
||||
<Compile Include="Task\TaskStatusTest.netcoreapp.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -89,13 +89,11 @@ namespace System.Threading.Tasks.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[SecuritySafeCritical]
|
||||
private bool ExecuteTask(Task task)
|
||||
{
|
||||
return TryExecuteTask(task);
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override void QueueTask(Task task)
|
||||
{
|
||||
_tasks.Add(task);
|
||||
@@ -109,7 +107,6 @@ namespace System.Threading.Tasks.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
|
||||
{
|
||||
RunSyncCalledCount++;
|
||||
@@ -128,7 +125,6 @@ namespace System.Threading.Tasks.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override IEnumerable<Task> GetScheduledTasks()
|
||||
{
|
||||
return _tasks;
|
||||
|
||||
@@ -339,13 +339,11 @@ namespace System.Threading.Tasks.Tests
|
||||
|
||||
// Buggy task scheduler to make sure that we handle QueueTask()/TryExecuteTaskInline()
|
||||
// exceptions correctly. Used in RunBuggySchedulerTests() below.
|
||||
[SecuritySafeCritical]
|
||||
public class BuggyTaskScheduler : TaskScheduler
|
||||
{
|
||||
private readonly ConcurrentQueue<Task> _tasks = new ConcurrentQueue<Task>();
|
||||
|
||||
private bool _faultQueues;
|
||||
[SecurityCritical]
|
||||
protected override void QueueTask(Task task)
|
||||
{
|
||||
if (_faultQueues)
|
||||
@@ -354,13 +352,11 @@ namespace System.Threading.Tasks.Tests
|
||||
_tasks.Enqueue(task);
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
|
||||
{
|
||||
throw new ArgumentException("I am your worst nightmare!");
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
protected override IEnumerable<Task> GetScheduledTasks()
|
||||
{
|
||||
return _tasks;
|
||||
|
||||
Reference in New Issue
Block a user