6 types derived from TaskScheduler
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
System.Private.CoreLib (3)
942 references to TaskScheduler
Aspire.Hosting (1)
Aspire.Hosting.Azure (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 (5)
Kestrel.SampleApp (1)
Metrics (19)
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 (19)
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 (19)
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 (19)
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 (19)
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 (19)
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 (19)
Microsoft.CodeAnalysis.PooledObjects.Package (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (19)
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 (19)
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 (16)
ParallelExtensions.NetFramework.cs (14)
44return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
62return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
222return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, default(CancellationToken), body);
240return ForEachAsync(source, DefaultDegreeOfParallelism, TaskScheduler.Default, cancellationToken, body);
274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
396/// <summary>The <see cref="TaskScheduler"/> on which all work should be performed.</summary>
397private readonly TaskScheduler _scheduler;
418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body)
585int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
611int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
638bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken,
Microsoft.CodeAnalysis.Workspaces (26)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (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.LanguageServices (22)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
mscorlib (1)
netstandard (1)
OrderProcessor (1)
Replay (2)
Roslyn.Diagnostics.Analyzers (19)
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.Ports (1)
System.Linq.Expressions (1)
System.Linq.Parallel (25)
System.Net.HttpListener (1)
System.Net.Ping (1)
System.Private.CoreLib (305)
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)
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\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.
504TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
536TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler? scheduler)
847internal void FireTaskScheduledIfNeeded(TaskScheduler ts)
903/// cref="TaskScheduler">TaskScheduler</see>.
916Start(TaskScheduler.Current);
921/// cref="TaskScheduler">TaskScheduler</see>.
928/// The <see cref="TaskScheduler">TaskScheduler</see> with which to associate
939public void Start(TaskScheduler scheduler)
977/// cref="TaskScheduler">TaskScheduler</see>.
986/// cref="TaskScheduler">TaskScheduler</see>.
1001InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true);
1006/// cref="TaskScheduler">scheduler</see> provided.
1027public void RunSynchronously(TaskScheduler scheduler)
1040internal 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);
2511if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2582if (TaskScheduler.InternalCurrent is TaskScheduler scheduler && scheduler != TaskScheduler.Default)
2988currentTask != null ? currentTask.m_taskScheduler!.Id : TaskScheduler.Default.Id, currentTask != null ? currentTask.Id : 0,
3024log.TaskWaitEnd(TaskScheduler.Default.Id, 0, this.Id);
3176TaskScheduler? ts = m_taskScheduler;
3643return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None);
3665return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3676/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3690public Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler)
3725return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions);
3744/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3764TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3770private Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler,
3821return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None);
3844return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
3856/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
3870public Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler)
3906return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions);
3926/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
3946TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3952private Task ContinueWith(Action<Task, object?> continuationAction, object? state, TaskScheduler scheduler,
4006return ContinueWith(continuationFunction, TaskScheduler.Current, default,
4035return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4049/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4063public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler)
4101return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions);
4123/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4146TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4152private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
4206return ContinueWith(continuationFunction, state, TaskScheduler.Current, default,
4236return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None);
4251/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its execution.
4265public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler)
4304return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
4327/// The <see cref="TaskScheduler"/> to associate with the continuation task and to use for its
4350TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
4356private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
4450TaskScheduler scheduler,
4512log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
5527return InternalStartNew(null, action, null, default, TaskScheduler.Default,
5545return InternalStartNew(null, action, null, cancellationToken, TaskScheduler.Default,
5560TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5578TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None, TaskScheduler.Default);
5617Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
5661Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
7187/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7195/// <see cref="TaskScheduler">TaskScheduler</see> that oversubscription may be
7278/// A hint to a <see cref="TaskScheduler">TaskScheduler</see> to schedule a
7286/// 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)
2495/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2521TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2642/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2668TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2794/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2820CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2931/// <param name="scheduler">The <see cref="TaskScheduler">TaskScheduler</see>
2957CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
System.Runtime (1)
System.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.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)
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)
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 (5)
Text.Analyzers (19)
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)