7 types derived from TaskScheduler
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (1)
System.Private.CoreLib (3)
958 references to TaskScheduler
Aspire.Hosting (3)
Aspire.Hosting.Azure (1)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Docker (1)
BuildActionTelemetryTable (2)
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)
Kestrel.SampleApp (1)
Metrics (18)
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,
Metrics.Legacy (18)
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.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.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Analyzers (18)
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\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.BannedApiAnalyzers (18)
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\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.Collections.Package (2)
Microsoft.CodeAnalysis.Contracts.Package (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.Debugging.Package (2)
Microsoft.CodeAnalysis.EditorFeatures (31)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.InteractiveHost (17)
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.LanguageServer (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (18)
Microsoft.CodeAnalysis.PooledObjects.Package (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (18)
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.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (18)
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.Threading.Package (2)
Microsoft.CodeAnalysis.Workspaces (25)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.CommonLanguageServerProtocol.Framework.Example (2)
Microsoft.CommonLanguageServerProtocol.Framework.Package (4)
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.VisualBasic.Tests (4)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (4)
119}, cancellationToken: default, creationOptions: default, scheduler: TaskScheduler.Default)).ToArray();
157var tasks = Enumerable.Range(0, n).Select(i => Task.Factory.StartNew(() => { Assert.True(SendSecondInstanceArgs(pipeName, SendTimeout, sentArgs[i])); }, cancellationToken: default, creationOptions: default, scheduler: TaskScheduler.Default)).ToArray();
214var task = Task.Factory.StartNew(() => SendSecondInstanceArgs(pipeName, timeout: 300, []), cancellationToken: TestContext.Current.CancellationToken, creationOptions: default, scheduler: TaskScheduler.Default);
229var task = Task.Factory.StartNew(() => SendSecondInstanceArgs(pipeName, SendTimeout, ["1", "ABC"]), cancellationToken: TestContext.Current.CancellationToken, creationOptions: default, scheduler: TaskScheduler.Default);
Microsoft.VisualStudio.Extensibility.Testing.Xunit (3)
Microsoft.VisualStudio.LanguageServices (19)
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Microsoft.VisualStudio.LanguageServices.Implementation (3)
mscorlib (1)
netstandard (1)
OrderProcessor (1)
Replay (2)
Roslyn.Diagnostics.Analyzers (18)
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,
Roslyn.VisualStudio.DiagnosticsWindow (1)
ScenarioTests.Common.Tests (1)
Security.TransportSecurity.IntegrationTests (2)
SemanticSearch.BuildTask (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 (7)
System.Net.HttpListener (1)
System.Net.NameResolution (3)
System\Net\Dns.cs (3)
143}, hostNameOrAddress, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
919}, key, cancellationToken, TaskContinuationOptions.DenyChildAttach, TaskScheduler.Default);
933}, 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 (307)
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 (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\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (72)
127internal TaskScheduler? m_taskScheduler; // The task scheduler this task runs under.
580TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
613TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
924internal void FireTaskScheduledIfNeeded(TaskScheduler ts)
980/// cref="TaskScheduler">TaskScheduler</see>.
993Start(TaskScheduler.Current);
998/// cref="TaskScheduler">TaskScheduler</see>.
1005/// The <see cref="TaskScheduler">TaskScheduler</see> with which to associate
1016public void Start(TaskScheduler scheduler)
1054/// cref="TaskScheduler">TaskScheduler</see>.
1063/// cref="TaskScheduler">TaskScheduler</see>.
1078InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true);
1083/// cref="TaskScheduler">scheduler</see> provided.
1104public void RunSynchronously(TaskScheduler scheduler)
1117internal void InternalRunSynchronously(TaskScheduler scheduler, bool waitForCompletion)
1219Task? creatingTask, Delegate action, object? state, CancellationToken cancellationToken, TaskScheduler scheduler,
1530internal TaskScheduler? ExecutingTaskScheduler => m_taskScheduler;
2396log.TaskStarted(TaskScheduler.Current.Id, 0, this.Id);
2450log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted);
2589if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2660if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
3063currentTask != null ? currentTask.m_taskScheduler!.Id : TaskScheduler.Default.Id, currentTask != null ? currentTask.Id : 0,
3101log.TaskWaitEnd(TaskScheduler.Default.Id, 0, this.Id);
3260TaskScheduler? ts = m_taskScheduler;
3727return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
3749return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3760/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3774public Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler)
3809return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
3828/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3848TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3854private Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler,
3905return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
3928return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3940/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3954public Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler)
3990return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
4010/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4030TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4036private Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler,
4090return ContinueWith(continuationFunction, TaskScheduler.Current, default,
4119return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4133/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4147public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler)
4185return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
4207/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4230TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4236private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
4290return ContinueWith(continuationFunction, state, TaskScheduler.Current, default,
4320return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4335/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4349public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler)
4388return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
4411/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4434TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4440private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
4534TaskScheduler scheduler,
4596log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
5593return InternalStartNew(null, action, null, default, TaskScheduler.Default,
5611return InternalStartNew(null, action, null, cancellationToken, TaskScheduler.Default,
5626TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5644TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5683Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
5727Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
7253/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7261/// <see cref="TaskScheduler">TaskScheduler</see> that oversubscription may be
7344/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7352/// a hint to the <see cref="TaskScheduler">TaskScheduler</see> that
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\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)
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)
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)
System.Runtime (1)
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\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,
SystemdTestApp (1)
Test.Utilities (4)
Text.Analyzers (18)
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,
UnitTests.Common (1)
VBCSCompiler (1)