231 lines
9.9 KiB
C#
231 lines
9.9 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Threading.Tasks
|
|
{
|
|
/// <summary>Represents an object that handles the low-level work of queuing tasks onto threads.</summary>
|
|
// Token: 0x020003B0 RID: 944
|
|
[Token(Token = "0x20003B0")]
|
|
[DebuggerTypeProxy(typeof(TaskScheduler.SystemThreadingTasks_TaskSchedulerDebugView))]
|
|
[DebuggerDisplay("Id={Id}")]
|
|
public abstract class TaskScheduler
|
|
{
|
|
/// <summary>Queues a <see cref="T:System.Threading.Tasks.Task" /> to the scheduler.</summary>
|
|
/// <param name="task">The <see cref="T:System.Threading.Tasks.Task" /> to be queued.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="task" /> argument is null.</exception>
|
|
// Token: 0x06002214 RID: 8724
|
|
[Token(Token = "0x6002214")]
|
|
[Address(Slot = "4")]
|
|
protected internal abstract void QueueTask(Task task);
|
|
|
|
/// <summary>Determines whether the provided <see cref="T:System.Threading.Tasks.Task" /> can be executed synchronously in this call, and if it can, executes it.</summary>
|
|
/// <param name="task">The <see cref="T:System.Threading.Tasks.Task" /> to be executed.</param>
|
|
/// <param name="taskWasPreviouslyQueued">A Boolean denoting whether or not task has previously been queued. If this parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to have been queued, and this call is being made in order to execute the task inline without queuing it.</param>
|
|
/// <returns>A Boolean value indicating whether the task was executed inline.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="task" /> argument is null.</exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The <paramref name="task" /> was already executed.</exception>
|
|
// Token: 0x06002215 RID: 8725
|
|
[Token(Token = "0x6002215")]
|
|
[Address(Slot = "5")]
|
|
protected abstract bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued);
|
|
|
|
/// <summary>Indicates the maximum concurrency level this <see cref="T:System.Threading.Tasks.TaskScheduler" /> is able to support.</summary>
|
|
/// <returns>Returns an integer that represents the maximum concurrency level. The default scheduler returns <see cref="F:System.Int32.MaxValue" />.</returns>
|
|
// Token: 0x170004C1 RID: 1217
|
|
// (get) Token: 0x06002216 RID: 8726 RVA: 0x00016368 File Offset: 0x00014568
|
|
[Token(Token = "0x170004C1")]
|
|
public virtual int MaximumConcurrencyLevel
|
|
{
|
|
[Token(Token = "0x6002216")]
|
|
[Address(RVA = "0xB49970", Offset = "0xB48970", VA = "0x180B49970", Slot = "6")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002217 RID: 8727 RVA: 0x00016380 File Offset: 0x00014580
|
|
[Token(Token = "0x6002217")]
|
|
[Address(RVA = "0xB49150", Offset = "0xB48150", VA = "0x180B49150")]
|
|
internal bool TryRunInline(Task task, bool taskWasPreviouslyQueued)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Attempts to dequeue a <see cref="T:System.Threading.Tasks.Task" /> that was previously queued to this scheduler.</summary>
|
|
/// <param name="task">The <see cref="T:System.Threading.Tasks.Task" /> to be dequeued.</param>
|
|
/// <returns>A Boolean denoting whether the <paramref name="task" /> argument was successfully dequeued.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="task" /> argument is null.</exception>
|
|
// Token: 0x06002218 RID: 8728 RVA: 0x00016398 File Offset: 0x00014598
|
|
[Token(Token = "0x6002218")]
|
|
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "7")]
|
|
protected internal virtual bool TryDequeue(Task task)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x06002219 RID: 8729 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002219")]
|
|
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "8")]
|
|
internal virtual void NotifyWorkItemProgress()
|
|
{
|
|
}
|
|
|
|
// Token: 0x170004C2 RID: 1218
|
|
// (get) Token: 0x0600221A RID: 8730 RVA: 0x000163B0 File Offset: 0x000145B0
|
|
[Token(Token = "0x170004C2")]
|
|
internal virtual bool RequiresAtomicStartTransition
|
|
{
|
|
[Token(Token = "0x600221A")]
|
|
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "9")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600221B RID: 8731 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600221B")]
|
|
[Address(RVA = "0xB48F50", Offset = "0xB47F50", VA = "0x180B48F50")]
|
|
internal void InternalQueueTask(Task task)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes the <see cref="T:System.Threading.Tasks.TaskScheduler" />.</summary>
|
|
// Token: 0x0600221C RID: 8732 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600221C")]
|
|
[Address(RVA = "0xB49550", Offset = "0xB48550", VA = "0x180B49550")]
|
|
protected TaskScheduler()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600221D RID: 8733 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600221D")]
|
|
[Address(RVA = "0xB48D80", Offset = "0xB47D80", VA = "0x180B48D80")]
|
|
private void AddToActiveTaskSchedulers()
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets the default <see cref="T:System.Threading.Tasks.TaskScheduler" /> instance that is provided by the .NET Framework.</summary>
|
|
/// <returns>Returns the default <see cref="T:System.Threading.Tasks.TaskScheduler" /> instance.</returns>
|
|
// Token: 0x170004C3 RID: 1219
|
|
// (get) Token: 0x0600221E RID: 8734 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x170004C3")]
|
|
public static TaskScheduler Default
|
|
{
|
|
[Token(Token = "0x600221E")]
|
|
[Address(RVA = "0xB49760", Offset = "0xB48760", VA = "0x180B49760")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the <see cref="T:System.Threading.Tasks.TaskScheduler" /> associated with the currently executing task.</summary>
|
|
/// <returns>Returns the <see cref="T:System.Threading.Tasks.TaskScheduler" /> associated with the currently executing task.</returns>
|
|
// Token: 0x170004C4 RID: 1220
|
|
// (get) Token: 0x0600221F RID: 8735 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x170004C4")]
|
|
public static TaskScheduler Current
|
|
{
|
|
[Token(Token = "0x600221F")]
|
|
[Address(RVA = "0xB49690", Offset = "0xB48690", VA = "0x180B49690")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170004C5 RID: 1221
|
|
// (get) Token: 0x06002220 RID: 8736 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x170004C5")]
|
|
internal static TaskScheduler InternalCurrent
|
|
{
|
|
[Token(Token = "0x6002220")]
|
|
[Address(RVA = "0xB49870", Offset = "0xB48870", VA = "0x180B49870")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates a <see cref="T:System.Threading.Tasks.TaskScheduler" /> associated with the current <see cref="T:System.Threading.SynchronizationContext" />.</summary>
|
|
/// <returns>A <see cref="T:System.Threading.Tasks.TaskScheduler" /> associated with the current <see cref="T:System.Threading.SynchronizationContext" />, as determined by <see cref="P:System.Threading.SynchronizationContext.Current" />.</returns>
|
|
/// <exception cref="T:System.InvalidOperationException">The current SynchronizationContext may not be used as a TaskScheduler.</exception>
|
|
// Token: 0x06002221 RID: 8737 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002221")]
|
|
[Address(RVA = "0xB48E70", Offset = "0xB47E70", VA = "0x180B48E70")]
|
|
public static TaskScheduler FromCurrentSynchronizationContext()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Gets the unique ID for this <see cref="T:System.Threading.Tasks.TaskScheduler" />.</summary>
|
|
/// <returns>Returns the unique ID for this <see cref="T:System.Threading.Tasks.TaskScheduler" />.</returns>
|
|
// Token: 0x170004C6 RID: 1222
|
|
// (get) Token: 0x06002222 RID: 8738 RVA: 0x000163C8 File Offset: 0x000145C8
|
|
[Token(Token = "0x170004C6")]
|
|
public int Id
|
|
{
|
|
[Token(Token = "0x6002222")]
|
|
[Address(RVA = "0xB497C0", Offset = "0xB487C0", VA = "0x180B497C0")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>Attempts to execute the provided <see cref="T:System.Threading.Tasks.Task" /> on this scheduler.</summary>
|
|
/// <param name="task">A <see cref="T:System.Threading.Tasks.Task" /> object to be executed.</param>
|
|
/// <returns>A Boolean that is true if <paramref name="task" /> was successfully executed, false if it was not. A common reason for execution failure is that the task had previously been executed or is in the process of being executed by another thread.</returns>
|
|
/// <exception cref="T:System.InvalidOperationException">The <paramref name="task" /> is not associated with this scheduler.</exception>
|
|
// Token: 0x06002223 RID: 8739 RVA: 0x000163E0 File Offset: 0x000145E0
|
|
[Token(Token = "0x6002223")]
|
|
[Address(RVA = "0xB490B0", Offset = "0xB480B0", VA = "0x180B490B0")]
|
|
protected bool TryExecuteTask(Task task)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x06002224 RID: 8740 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002224")]
|
|
[Address(RVA = "0xB48F80", Offset = "0xB47F80", VA = "0x180B48F80")]
|
|
internal static void PublishUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs ueea)
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001313 RID: 4883
|
|
[Token(Token = "0x4001313")]
|
|
private static ConditionalWeakTable<TaskScheduler, object> s_activeTaskSchedulers;
|
|
|
|
// Token: 0x04001314 RID: 4884
|
|
[Token(Token = "0x4001314")]
|
|
private static readonly TaskScheduler s_defaultTaskScheduler;
|
|
|
|
// Token: 0x04001315 RID: 4885
|
|
[Token(Token = "0x4001315")]
|
|
internal static int s_taskSchedulerIdCounter;
|
|
|
|
// Token: 0x04001316 RID: 4886
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4001316")]
|
|
private int m_taskSchedulerId;
|
|
|
|
// Token: 0x04001317 RID: 4887
|
|
[Token(Token = "0x4001317")]
|
|
private static EventHandler<UnobservedTaskExceptionEventArgs> _unobservedTaskException;
|
|
|
|
// Token: 0x04001318 RID: 4888
|
|
[Token(Token = "0x4001318")]
|
|
private static readonly object _unobservedTaskExceptionLockObject;
|
|
|
|
// Token: 0x020003B1 RID: 945
|
|
[Token(Token = "0x20003B1")]
|
|
internal sealed class SystemThreadingTasks_TaskSchedulerDebugView
|
|
{
|
|
}
|
|
}
|
|
}
|