5 types derived from TaskScheduler
Microsoft.Build (2)
System.Private.CoreLib (3)
738 references to TaskScheduler
Aspire.Hosting (3)
Aspire.Hosting.Azure (1)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Docker (1)
Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests (1)
Client.ChannelLayer.IntegrationTests (2)
Client.TypedClient.IntegrationTests (5)
CodeStyleConfigFileGenerator (2)
Consumer (1)
Contract.Service.IntegrationTests (8)
ServiceContractTests.4.0.0.cs (4)
336Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Open_ChannelFactory(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
389Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Open_Proxy(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
440Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Close_ChannelFactory(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
490Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Close_Proxy(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
ServiceContractTests.4.1.0.cs (4)
210Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
224Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed_Async(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
614Task.Factory.StartNew(() => ServiceContractTests.NetTcp_NoSecurity_Streamed_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
628Task.Factory.StartNew(() => ServiceContractTests.NetTcp_NoSecurity_Streamed_Async_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
dotnet-svcutil-lib (9)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (6)
47}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
68}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
92}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
124}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
281return (TaskScheduler.Current == TaskScheduler.Default) &&
GenerateDocumentationAndConfigFiles (4)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.Build (6)
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Analyzers (18)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
Microsoft.CodeAnalysis.AnalyzerUtilities (18)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
Microsoft.CodeAnalysis.CodeStyle (18)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (18)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
Microsoft.CodeAnalysis.Workspaces (15)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
Microsoft.Extensions.Caching.Memory (3)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.JSInterop (3)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.Core (1)
Microsoft.TemplateEngine.Utils (2)
MSBuild.Coordinator (1)
mscorlib (1)
netstandard (1)
NuGet.Commands (1)
NuGet.DependencyResolver.Core (1)
NuGet.Protocol (4)
OrderProcessor (1)
Roslyn.Diagnostics.Analyzers (18)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
ScenarioTests.Common.Tests (1)
Security.TransportSecurity.IntegrationTests (2)
System.ComponentModel.EventBasedAsync (1)
System.Data.Odbc (2)
System.Data.OleDb (2)
System.IO.Pipes (1)
System.IO.Ports (1)
System.Linq.Expressions (1)
System.Linq.Parallel (25)
System.Net.Http (7)
System.Net.Http.WinHttpHandler (2)
System.Net.HttpListener (1)
System.Net.NameResolution (3)
System\Net\Dns.cs (3)
143}, hostNameOrAddress, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
973}, key, cancellationToken, TaskContinuationOptions.DenyChildAttach, TaskScheduler.Default);
987}, key, CancellationToken.None, TaskContinuationOptions.OnlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
System.Net.NetworkInformation (1)
System.Net.Ping (1)
System.Net.Quic (1)
System.Net.Requests (6)
System\Net\FileWebRequest.cs (4)
161this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
174}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
222this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
235}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Net.WebSockets (1)
System.Private.CoreLib (331)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (4)
223cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
281}, new TupleSlim<TextReader, Memory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default));
288}, new TupleSlim<TextReader, Memory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default));
311}, new TupleSlim<TextReader, Memory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (11)
593}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
611}, new TupleSlim<TextWriter, char, char>(this, valueChars[0], valueChars[1]), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
622}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
670}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
680}, new TupleSlim<TextWriter, ReadOnlyMemory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
687}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
705}, new TupleSlim<TextWriter, char, char>(this, valueChars[0], valueChars[1]), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
716}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
765}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
775}, new TupleSlim<TextWriter, ReadOnlyMemory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
793CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.cs (36)
285TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler) :
301TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler) :
309TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
329TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
629return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
652return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
664/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
678public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler)
713return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
732/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
752TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
758internal Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler, CancellationToken cancellationToken,
810return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
834return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
847/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
861public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler)
897return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
917/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
937TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
943internal Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken,
998return ContinueWith(continuationFunction, TaskScheduler.Current, default, TaskContinuationOptions.None);
1027return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
1041/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
1055public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler)
1099return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
1121/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
1151TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1157internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler,
1212return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
1243return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
1258/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
1273TaskScheduler scheduler)
1319return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
1342/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
1372CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1379TaskScheduler scheduler, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (72)
127internal TaskScheduler? m_taskScheduler; // The task scheduler this task runs under.
651TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
684TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
995internal void FireTaskScheduledIfNeeded(TaskScheduler ts)
1051/// cref="TaskScheduler">TaskScheduler</see>.
1064Start(TaskScheduler.Current);
1069/// cref="TaskScheduler">TaskScheduler</see>.
1076/// The <see cref="TaskScheduler">TaskScheduler</see> with which to associate
1087public void Start(TaskScheduler scheduler)
1125/// cref="TaskScheduler">TaskScheduler</see>.
1134/// cref="TaskScheduler">TaskScheduler</see>.
1149InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true);
1154/// cref="TaskScheduler">scheduler</see> provided.
1175public void RunSynchronously(TaskScheduler scheduler)
1188internal void InternalRunSynchronously(TaskScheduler scheduler, bool waitForCompletion)
1290Task? creatingTask, Delegate action, object? state, CancellationToken cancellationToken, TaskScheduler scheduler,
1601internal TaskScheduler? ExecutingTaskScheduler => m_taskScheduler;
2472log.TaskStarted(TaskScheduler.Current.Id, 0, this.Id);
2526log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted);
2665if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2736if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
3139currentTask != null ? currentTask.m_taskScheduler!.Id : TaskScheduler.Default.Id, currentTask != null ? currentTask.Id : 0,
3177log.TaskWaitEnd(TaskScheduler.Default.Id, 0, this.Id);
3336TaskScheduler? ts = m_taskScheduler;
3827return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
3849return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3860/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3874public Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler)
3909return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
3928/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3948TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3954private Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler,
4005return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
4028return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4040/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4054public Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler)
4090return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
4110/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4130TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4136private Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler,
4190return ContinueWith(continuationFunction, TaskScheduler.Current, default,
4219return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4233/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4247public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler)
4285return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
4307/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4330TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4336private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
4390return ContinueWith(continuationFunction, state, TaskScheduler.Current, default,
4420return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4435/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4449public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler)
4488return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
4511/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4534TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4540private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
4634TaskScheduler scheduler,
4696log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
5694return InternalStartNew(null, action, null, default, TaskScheduler.Default,
5712return InternalStartNew(null, action, null, cancellationToken, TaskScheduler.Default,
5727TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5745TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5784Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
5828Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
7356/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7364/// <see cref="TaskScheduler">TaskScheduler</see> that oversubscription may be
7447/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7455/// a hint to the <see cref="TaskScheduler">TaskScheduler</see> that
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (15)
266private readonly TaskScheduler m_taskScheduler;
272internal ContinueWithTaskContinuation(Task task, TaskContinuationOptions options, TaskScheduler scheduler)
407log.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ?? TaskScheduler.Default).Id, task.Id, m_continuationId);
456private readonly TaskScheduler m_scheduler;
463TaskScheduler scheduler, Action action, bool flowExecutionContext) :
476if (m_scheduler == TaskScheduler.Default)
491internal static void RunOrScheduleAction(Action action, TaskScheduler scheduler, ExecutionContext? capturedContext, bool allowInlining)
494Debug.Assert(scheduler != null && scheduler != TaskScheduler.Default);
503(TaskScheduler.InternalCurrent == scheduler || Thread.CurrentThread.IsThreadPoolThread);
561protected static Task CreateTask(Action<object?> action, object? state, TaskScheduler scheduler, ExecutionContext? capturedContext)
594log.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ?? TaskScheduler.Default).Id, task.Id, m_continuationId);
629TaskScheduler? sched = TaskScheduler.InternalCurrent;
630return sched == null || sched == TaskScheduler.Default;
839log.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ?? TaskScheduler.Default).Id, task.Id, atc.m_continuationId);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (41)
35private readonly TaskScheduler? m_defaultScheduler;
39private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current;
42private TaskScheduler GetDefaultScheduler(Task? currTask)
49else return TaskScheduler.Default;
63/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
65/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
83/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
85/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
96/// The <see cref="TaskScheduler">
106/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
109/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
111public TaskFactory(TaskScheduler? scheduler) // null means to use TaskScheduler.Current
138/// cref="TaskScheduler">TaskScheduler</see> property is initialized to the
140/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
166/// The default <see cref="TaskScheduler">
181/// cref="TaskScheduler">TaskScheduler</see> property is initialized to
184/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
186public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler? scheduler)
207/// Gets the <see cref="TaskScheduler">TaskScheduler</see> of this
213/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
216public TaskScheduler? Scheduler => m_defaultScheduler;
330/// cref="TaskScheduler">TaskScheduler</see>
353public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
457/// cref="TaskScheduler">TaskScheduler</see>
480public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
603/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
622TaskScheduler scheduler)
634TaskScheduler scheduler)
1432/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1458CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1568/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1594CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1606TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
1653TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
1802/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1828CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1938/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1964CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1975TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
2026TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (50)
38private readonly TaskScheduler? m_defaultScheduler;
42private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current;
45private TaskScheduler GetDefaultScheduler(Task? currTask)
50TaskScheduler.Default);
68/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
70/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
88/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
90/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
101/// The <see cref="TaskScheduler">
111/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
114/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
116public TaskFactory(TaskScheduler? scheduler) // null means to use TaskScheduler.Current
143/// cref="TaskScheduler">TaskScheduler</see> property is initialized to the
145/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
171/// The default <see cref="TaskScheduler">
186/// cref="TaskScheduler">TaskScheduler</see> property is initialized to
189/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
191public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler? scheduler)
227/// Gets the <see cref="TaskScheduler">TaskScheduler</see> of this
233/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
236public TaskScheduler? Scheduler => m_defaultScheduler;
345/// cref="TaskScheduler">TaskScheduler</see>
368public Task StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
470/// cref="TaskScheduler">TaskScheduler</see>
494TaskCreationOptions creationOptions, TaskScheduler scheduler)
603/// cref="TaskScheduler">TaskScheduler</see>
626public Task<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
743/// cref="TaskScheduler">TaskScheduler</see>
767TaskCreationOptions creationOptions, TaskScheduler scheduler)
834/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
853TaskScheduler scheduler)
1198/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1214IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod, TaskCreationOptions creationOptions, TaskScheduler scheduler)
1779/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1805TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1916/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1942CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2063/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2089TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2216/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2242CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2495/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2521TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2642/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2668TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2794/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2820CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2931/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2957CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (4)
System.ServiceModel.Federation (5)
System\Runtime\TaskHelpers.cs (4)
33}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
63}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
87}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
119}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
System.ServiceModel.Http (1)
System.ServiceModel.Primitives (11)
Internals\System\Runtime\TaskHelpers.cs (6)
48}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
78}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
102}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
134}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
442return (TaskScheduler.Current == TaskScheduler.Default) &&
System.ServiceModel.Primitives.Tests (1)
System.Text.RegularExpressions (11)
System\Threading\StackHelper.cs (11)
40.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
51.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
64.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
79.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
96.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
115.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
123.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
133.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
145.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
159.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
175.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
System.Text.RegularExpressions.Generator (11)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Threading\StackHelper.cs (11)
40.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
51.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
64.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
79.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
96.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
115.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
123.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
133.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
145.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
159.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
175.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
System.Threading.Channels (8)
System.Threading.Tasks (1)
System.Threading.Tasks.Dataflow (58)
Base\DataflowBlock.cs (13)
513CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
527CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
1296}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1307}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1328}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1839TaskScheduler scheduler = dataflowBlockOptions.TaskScheduler;
1868ISourceBlock<T> source, Action<T> action, int branchId, TaskScheduler scheduler,
1926TaskScheduler scheduler = dataflowBlockOptions.TaskScheduler;
1988}, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
2003TaskScheduler scheduler,
2388TaskScheduler.Default);
2401TaskScheduler.Default);
2402}, this, Canceler.Token, Common.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
Blocks\BatchBlock.cs (4)
75CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
86}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
547}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
655exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BroadcastBlock.cs (6)
93}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
271exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
404}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
650}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
864}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
947this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BufferBlock.cs (3)
75}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
272exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
407}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\JoinBlock.cs (5)
86CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
97}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
305CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
316}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
1335}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Internal\SourceCore.cs (3)
523}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
786}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
920this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
System.Threading.Tasks.Parallel (36)
System\Threading\Tasks\Parallel.cs (16)
33private TaskScheduler? _scheduler;
49_scheduler = TaskScheduler.Default;
55/// Gets or sets the <see cref="System.Threading.Tasks.TaskScheduler">TaskScheduler</see>
59public TaskScheduler? TaskScheduler
66internal TaskScheduler EffectiveTaskScheduler => _scheduler ?? TaskScheduler.Current;
223ParallelEtwProvider.Log.ParallelInvokeBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
362ParallelEtwProvider.Log.ParallelInvokeEnd(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
968ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
1005ParallelEtwProvider.Log.ParallelFork(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
1105ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
1150ParallelEtwProvider.Log.ParallelLoopEnd(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID, long.CreateTruncating(nTotalIterations));
2535ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
2596ParallelEtwProvider.Log.ParallelFork(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
2741ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
2789ParallelEtwProvider.Log.ParallelLoopEnd(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID, 0);
System\Threading\Tasks\Parallel.ForEachAsync.cs (18)
27return ForAsync(fromInclusive, toExclusive, DefaultDegreeOfParallelism, TaskScheduler.Default, default, body);
45return ForAsync(fromInclusive, toExclusive, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
77private static Task ForAsync<T>(T fromInclusive, T toExclusive, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<T, CancellationToken, ValueTask> body)
203return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
219return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
247private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
358return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
374return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
402private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
520/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
521private readonly TaskScheduler _scheduler;
540protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
547if (scheduler == TaskScheduler.Default)
572if (_scheduler == TaskScheduler.Default)
671Debug.Assert(_scheduler == TaskScheduler.Default, $"Expected {nameof(_scheduler)} == TaskScheduler.Default, got {_scheduler}");
692int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
714int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
737int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
System.Windows.Forms.Primitives (1)
UnitTests.Common (1)
VBCSCompiler (1)