77 references to Current
Consumer (1)
ConsumerWorker.cs (1)
39}, stoppingToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
281return (TaskScheduler.Current == TaskScheduler.Default) &&
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.JSInterop (3)
Infrastructure\DotNetDispatcher.cs (3)
118task.ContinueWith(t => EndInvokeDotNetAfterTask(t, jsRuntime, invocationInfo), TaskScheduler.Current); 123valueTaskResult.AsTask().ContinueWith(t => EndInvokeDotNetAfterTask(t, jsRuntime, invocationInfo), TaskScheduler.Current); 131innerTask!.ContinueWith(t => EndInvokeDotNetAfterTask(t, jsRuntime, invocationInfo), TaskScheduler.Current);
OrderProcessor (1)
OrderProcessingWorker.cs (1)
43}, stoppingToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
497}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Current);
System.Private.CoreLib (47)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (2)
95TaskScheduler scheduler = TaskScheduler.Current; 136TaskScheduler scheduler = TaskScheduler.Current;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
158TaskScheduler ts = TaskScheduler.Current;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (17)
1060Start(TaskScheduler.Current); 1145InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true); 2464log.TaskStarted(TaskScheduler.Current.Id, 0, this.Id); 2518log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted); 3819return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None); 3841return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 3901return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions); 3997return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None); 4020return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 4082return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions); 4182return ContinueWith(continuationFunction, TaskScheduler.Current, default, 4211return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 4277return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions); 4382return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, 4412return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 4480return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions); 4688log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.cs (12)
629return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None); 652return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 713return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions); 810return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None); 834return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 897return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions); 998return ContinueWith(continuationFunction, TaskScheduler.Current, default, TaskContinuationOptions.None); 1027return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 1099return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions); 1212return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, TaskContinuationOptions.None); 1243return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 1319return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (7)
42private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current; 70/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 90/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 114/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 145/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 189/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 233/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (7)
39private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current; 65/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 85/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 109/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 140/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 184/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 213/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
298/// When not called from within a task, <see cref="Current"/> will return the <see cref="Default"/> scheduler.
System.Runtime.InteropServices.JavaScript (3)
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Task.cs (3)
221task.ContinueWith(Complete, taskHolder, TaskScheduler.Current); 307task.ContinueWith(Complete, taskHolder, TaskScheduler.Current); 386task.ContinueWith(Complete, new HolderAndMarshaler<T>(taskHolder, marshaler), TaskScheduler.Current);
System.ServiceModel.Primitives (1)
Internals\System\Runtime\TaskHelpers.cs (1)
442return (TaskScheduler.Current == TaskScheduler.Default) &&
System.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
251if (RunContinuationsAsynchronously || ts != TaskScheduler.Current) 343ts = TaskScheduler.Current;
System.Threading.Tasks.Parallel (12)
System\Threading\Tasks\Parallel.cs (11)
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\TaskReplicator.cs (1)
127_scheduler = options.TaskScheduler ?? TaskScheduler.Current;