5 types derived from TaskScheduler
Microsoft.Build (2)
System.Private.CoreLib (3)
547 references to TaskScheduler
Client.ChannelLayer.IntegrationTests (2)
Client.TypedClient.IntegrationTests (5)
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) &&
Kestrel.SampleApp (1)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebView.Photino (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 (7)
Microsoft.Extensions.Caching.Memory (3)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.JSInterop (3)
mscorlib (1)
netstandard (1)
ScenarioTests.Common.Tests (1)
Security.TransportSecurity.IntegrationTests (2)
System.ComponentModel.EventBasedAsync (1)
System.Data.Odbc (2)
System.IO.Pipes (1)
System.IO.Ports (1)
System.Linq.Expressions (1)
System.Linq.Parallel (25)
System.Net.Http (8)
System.Net.HttpListener (1)
System.Net.Mail (1)
System.Net.NameResolution (3)
System\Net\Dns.cs (3)
139}, hostNameOrAddress, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
686}, key, cancellationToken, TaskContinuationOptions.DenyChildAttach, TaskScheduler.Default);
698}, 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)
159this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
172}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
220this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
233}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Net.WebSockets (1)
System.Private.CoreLib (297)
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\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (9)
543}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
550}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
589}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
599}, new TupleSlim<TextWriter, ReadOnlyMemory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
606}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
613}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
653}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
663}, new TupleSlim<TextWriter, ReadOnlyMemory<char>>(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
673CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (36)
287TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler) :
303TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler) :
311TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
331TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
631return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
654return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
666/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
680public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler)
715return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
734/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
754TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
760internal Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler, CancellationToken cancellationToken,
812return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
836return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
849/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
863public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler)
899return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
919/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
939TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
945internal Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken,
1000return ContinueWith(continuationFunction, TaskScheduler.Current, default, TaskContinuationOptions.None);
1029return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
1043/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
1057public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler)
1101return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
1123/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
1153TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1159internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler,
1214return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
1245return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
1260/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
1275TaskScheduler scheduler)
1321return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
1344/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
1374CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1381TaskScheduler scheduler, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (41)
34private readonly TaskScheduler? m_defaultScheduler;
38private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current;
41private TaskScheduler GetDefaultScheduler(Task? currTask)
48else return TaskScheduler.Default;
62/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
64/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
82/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
84/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
95/// The <see cref="TaskScheduler">
105/// and the <see cref="TaskScheduler">TaskScheduler</see> property is
108/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
110public TaskFactory(TaskScheduler? scheduler) // null means to use TaskScheduler.Current
137/// cref="TaskScheduler">TaskScheduler</see> property is initialized to the
139/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
165/// The default <see cref="TaskScheduler">
180/// cref="TaskScheduler">TaskScheduler</see> property is initialized to
183/// cref="TaskScheduler.Current">TaskScheduler.Current</see>).
185public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler? scheduler)
206/// Gets the <see cref="TaskScheduler">TaskScheduler</see> of this
212/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
215public TaskScheduler? Scheduler => m_defaultScheduler;
329/// cref="TaskScheduler">TaskScheduler</see>
352public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
456/// cref="TaskScheduler">TaskScheduler</see>
479public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
602/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
621TaskScheduler scheduler)
633TaskScheduler scheduler)
1429/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1455CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1565/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1591CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1603TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
1650TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
1799/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1825CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1935/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
1961CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1972TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
2023TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (72)
128internal TaskScheduler? m_taskScheduler; // The task scheduler this task runs under.
506TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
538TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
848internal void FireTaskScheduledIfNeeded(TaskScheduler ts)
904/// cref="TaskScheduler">TaskScheduler</see>.
917Start(TaskScheduler.Current);
922/// cref="TaskScheduler">TaskScheduler</see>.
929/// The <see cref="TaskScheduler">TaskScheduler</see> with which to associate
940public void Start(TaskScheduler scheduler)
978/// cref="TaskScheduler">TaskScheduler</see>.
987/// cref="TaskScheduler">TaskScheduler</see>.
1002InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true);
1007/// cref="TaskScheduler">scheduler</see> provided.
1028public void RunSynchronously(TaskScheduler scheduler)
1041internal void InternalRunSynchronously(TaskScheduler scheduler, bool waitForCompletion)
1142Task? creatingTask, Delegate action, object? state, CancellationToken cancellationToken, TaskScheduler scheduler,
1453internal TaskScheduler? ExecutingTaskScheduler => m_taskScheduler;
2318log.TaskStarted(TaskScheduler.Current.Id, 0, this.Id);
2372log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted);
2509if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2580if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2983currentTask != null ? currentTask.m_taskScheduler!.Id : TaskScheduler.Default.Id, currentTask != null ? currentTask.Id : 0,
3019log.TaskWaitEnd(TaskScheduler.Default.Id, 0, this.Id);
3155TaskScheduler? ts = m_taskScheduler;
3622return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
3644return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3655/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3669public Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler)
3704return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
3723/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3743TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3749private Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler,
3800return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
3823return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3835/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3849public Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler)
3885return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
3905/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3925TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3931private Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler,
3985return ContinueWith(continuationFunction, TaskScheduler.Current, default,
4014return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4028/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4042public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler)
4080return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
4102/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4125TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4131private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
4185return ContinueWith(continuationFunction, state, TaskScheduler.Current, default,
4215return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4230/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4244public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler)
4283return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
4306/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4329TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4335private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
4429TaskScheduler scheduler,
4491log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
5481return InternalStartNew(null, action, null, default, TaskScheduler.Default,
5499return InternalStartNew(null, action, null, cancellationToken, TaskScheduler.Default,
5514TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5532TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5571Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
5615Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
7104/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7112/// <see cref="TaskScheduler">TaskScheduler</see> that oversubscription may be
7195/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7203/// a hint to the <see cref="TaskScheduler">TaskScheduler</see> that
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (13)
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)
489(TaskScheduler.InternalCurrent == m_scheduler || Thread.CurrentThread.IsThreadPoolThread);
547protected Task CreateTask(Action<object?> action, object? state, TaskScheduler scheduler)
580log.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ?? TaskScheduler.Default).Id, task.Id, m_continuationId);
615TaskScheduler? sched = TaskScheduler.InternalCurrent;
616return sched == null || sched == TaskScheduler.Default;
818log.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ?? TaskScheduler.Default).Id, task.Id, atc.m_continuationId);
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)
2497/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2523TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2644/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2670TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2796/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2822CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2933/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2959CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
System.Runtime (1)
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\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 (7)
System.Threading.Tasks (1)
System.Threading.Tasks.Dataflow (58)
Base\DataflowBlock.cs (13)
537CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
551CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
1329}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1340}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1361}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
1920TaskScheduler scheduler = dataflowBlockOptions.TaskScheduler;
1949ISourceBlock<T> source, Action<T> action, int branchId, TaskScheduler scheduler,
2007TaskScheduler scheduler = dataflowBlockOptions.TaskScheduler;
2067}, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
2082TaskScheduler scheduler,
2473TaskScheduler.Default);
2486TaskScheduler.Default);
2487}, 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);
550}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
658exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BroadcastBlock.cs (6)
96}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
277exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
410}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
656}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
870}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
953this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BufferBlock.cs (3)
78}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
278exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
413}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\JoinBlock.cs (5)
89CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
100}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
314CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
325}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
1350}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Internal\SourceCore.cs (3)
529}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
792}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
926this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
System.Threading.Tasks.Parallel (36)
System\Threading\Tasks\Parallel.cs (16)
31private TaskScheduler? _scheduler;
47_scheduler = TaskScheduler.Default;
53/// Gets or sets the <see cref="System.Threading.Tasks.TaskScheduler">TaskScheduler</see>
57public TaskScheduler? TaskScheduler
64internal TaskScheduler EffectiveTaskScheduler => _scheduler ?? TaskScheduler.Current;
221ParallelEtwProvider.Log.ParallelInvokeBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
367ParallelEtwProvider.Log.ParallelInvokeEnd(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
973ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
1010ParallelEtwProvider.Log.ParallelFork(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
1110ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
1155ParallelEtwProvider.Log.ParallelLoopEnd(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID, long.CreateTruncating(nTotalIterations));
2540ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.Current.Id, Task.CurrentId ?? 0,
2601ParallelEtwProvider.Log.ParallelFork(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
2747ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.Current.Id, Task.CurrentId ?? 0, forkJoinContextID);
2795ParallelEtwProvider.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)
227return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
243return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
271private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
382return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
398return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
426private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
544/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
545private readonly TaskScheduler _scheduler;
564protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
571if (scheduler == TaskScheduler.Default)
596if (_scheduler == TaskScheduler.Default)
695Debug.Assert(_scheduler == TaskScheduler.Default, $"Expected {nameof(_scheduler)} == TaskScheduler.Default, got {_scheduler}");
716int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
738int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
761bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
SystemdTestApp (1)
UnitTests.Common (1)