Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

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: 0x02000394 RID: 916
[Token(Token = "0x2000394")]
[DebuggerDisplay("Id={Id}")]
[DebuggerTypeProxy(typeof(TaskScheduler.SystemThreadingTasks_TaskSchedulerDebugView))]
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: 0x06002008 RID: 8200
[Token(Token = "0x6002008")]
[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: 0x06002009 RID: 8201
[Token(Token = "0x6002009")]
[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: 0x1700044A RID: 1098
// (get) Token: 0x0600200A RID: 8202 RVA: 0x00013F98 File Offset: 0x00012198
[Token(Token = "0x1700044A")]
public virtual int MaximumConcurrencyLevel
{
[Token(Token = "0x600200A")]
[Address(RVA = "0x1D9E8C0", Offset = "0x1D9D6C0", VA = "0x181D9E8C0", Slot = "6")]
get
{
return 0;
}
}
// Token: 0x0600200B RID: 8203 RVA: 0x00013FB0 File Offset: 0x000121B0
[Token(Token = "0x600200B")]
[Address(RVA = "0x1D9E0A0", Offset = "0x1D9CEA0", VA = "0x181D9E0A0")]
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: 0x0600200C RID: 8204 RVA: 0x00013FC8 File Offset: 0x000121C8
[Token(Token = "0x600200C")]
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "7")]
protected internal virtual bool TryDequeue(Task task)
{
return default(bool);
}
// Token: 0x0600200D RID: 8205 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600200D")]
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "8")]
internal virtual void NotifyWorkItemProgress()
{
}
// Token: 0x1700044B RID: 1099
// (get) Token: 0x0600200E RID: 8206 RVA: 0x00013FE0 File Offset: 0x000121E0
[Token(Token = "0x1700044B")]
internal virtual bool RequiresAtomicStartTransition
{
[Token(Token = "0x600200E")]
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "9")]
get
{
return default(bool);
}
}
// Token: 0x0600200F RID: 8207 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600200F")]
[Address(RVA = "0x1D9DEA0", Offset = "0x1D9CCA0", VA = "0x181D9DEA0")]
internal void InternalQueueTask(Task task)
{
}
/// <summary>Initializes the <see cref="T:System.Threading.Tasks.TaskScheduler" />.</summary>
// Token: 0x06002010 RID: 8208 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002010")]
[Address(RVA = "0x1D9E4A0", Offset = "0x1D9D2A0", VA = "0x181D9E4A0")]
protected TaskScheduler()
{
}
// Token: 0x06002011 RID: 8209 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002011")]
[Address(RVA = "0x1D9DCD0", Offset = "0x1D9CAD0", VA = "0x181D9DCD0")]
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: 0x1700044C RID: 1100
// (get) Token: 0x06002012 RID: 8210 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x1700044C")]
public static TaskScheduler Default
{
[Token(Token = "0x6002012")]
[Address(RVA = "0x1D9E6B0", Offset = "0x1D9D4B0", VA = "0x181D9E6B0")]
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: 0x1700044D RID: 1101
// (get) Token: 0x06002013 RID: 8211 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x1700044D")]
public static TaskScheduler Current
{
[Token(Token = "0x6002013")]
[Address(RVA = "0x1D9E5E0", Offset = "0x1D9D3E0", VA = "0x181D9E5E0")]
get
{
return null;
}
}
// Token: 0x1700044E RID: 1102
// (get) Token: 0x06002014 RID: 8212 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x1700044E")]
internal static TaskScheduler InternalCurrent
{
[Token(Token = "0x6002014")]
[Address(RVA = "0x1D9E7C0", Offset = "0x1D9D5C0", VA = "0x181D9E7C0")]
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: 0x06002015 RID: 8213 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002015")]
[Address(RVA = "0x1D9DDC0", Offset = "0x1D9CBC0", VA = "0x181D9DDC0")]
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: 0x1700044F RID: 1103
// (get) Token: 0x06002016 RID: 8214 RVA: 0x00013FF8 File Offset: 0x000121F8
[Token(Token = "0x1700044F")]
public int Id
{
[Token(Token = "0x6002016")]
[Address(RVA = "0x1D9E710", Offset = "0x1D9D510", VA = "0x181D9E710")]
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: 0x06002017 RID: 8215 RVA: 0x00014010 File Offset: 0x00012210
[Token(Token = "0x6002017")]
[Address(RVA = "0x1D9E000", Offset = "0x1D9CE00", VA = "0x181D9E000")]
protected bool TryExecuteTask(Task task)
{
return default(bool);
}
// Token: 0x06002018 RID: 8216 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002018")]
[Address(RVA = "0x1D9DED0", Offset = "0x1D9CCD0", VA = "0x181D9DED0")]
internal static void PublishUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs ueea)
{
}
// Token: 0x04001250 RID: 4688
[Token(Token = "0x4001250")]
private static ConditionalWeakTable<TaskScheduler, object> s_activeTaskSchedulers;
// Token: 0x04001251 RID: 4689
[Token(Token = "0x4001251")]
private static readonly TaskScheduler s_defaultTaskScheduler;
// Token: 0x04001252 RID: 4690
[Token(Token = "0x4001252")]
internal static int s_taskSchedulerIdCounter;
// Token: 0x04001253 RID: 4691
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4001253")]
private int m_taskSchedulerId;
// Token: 0x04001254 RID: 4692
[Token(Token = "0x4001254")]
private static EventHandler<UnobservedTaskExceptionEventArgs> _unobservedTaskException;
// Token: 0x04001255 RID: 4693
[Token(Token = "0x4001255")]
private static readonly object _unobservedTaskExceptionLockObject;
// Token: 0x02000395 RID: 917
[Token(Token = "0x2000395")]
internal sealed class SystemThreadingTasks_TaskSchedulerDebugView
{
}
}
}