92 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) &&
Metrics (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Metrics.Legacy (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoSynchronizationContext.cs (1)
240}, CancellationToken.None, flags, TaskScheduler.Current);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
88_ = Task.Factory.StartNew(RunGarbageCollectionLoopAsync, default, TaskCreationOptions.LongRunning, TaskScheduler.Current);
Microsoft.CodeAnalysis.Analyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.Threading.Package (1)
ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
Microsoft.CodeAnalysis.Workspaces (8)
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (3)
166Contract.ThrowIfFalse(TaskScheduler.Current == this.Storage.Scheduler.ConcurrentScheduler); 225Contract.ThrowIfFalse(TaskScheduler.Current == this.Storage.Scheduler.ExclusiveScheduler); 364Contract.ThrowIfFalse(TaskScheduler.Current == this.Storage.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage_FlushWrites.cs (1)
35Contract.ThrowIfFalse(TaskScheduler.Current == this.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage_StringIds.cs (3)
49TaskScheduler.Current == this.Scheduler.ExclusiveScheduler || 50TaskScheduler.Current == this.Scheduler.ConcurrentScheduler); 67Contract.ThrowIfFalse(TaskScheduler.Current == this.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage+PooledConnection.cs (1)
42var scheduler = TaskScheduler.Current;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\AsyncLazyTests.cs (1)
78}, CancellationToken.None, TaskCreationOptions.None, 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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;
System.Private.CoreLib (48)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (3)
95TaskScheduler scheduler = TaskScheduler.Current; 136TaskScheduler scheduler = TaskScheduler.Current; 157TplEventSource.Log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, (currentTask != null) ? currentTask.Id : 0, continuationId);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.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\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (7)
38private TaskScheduler DefaultScheduler => m_defaultScheduler ?? TaskScheduler.Current; 64/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 84/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 108/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 139/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 183/// cref="TaskScheduler.Current">TaskScheduler.Current</see>). 212/// If null, <see cref="TaskScheduler.Current">TaskScheduler.Current</see>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
144TaskScheduler ts = TaskScheduler.Current;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (17)
916Start(TaskScheduler.Current); 1001InternalRunSynchronously(TaskScheduler.Current, waitForCompletion: true); 2318log.TaskStarted(TaskScheduler.Current.Id, 0, this.Id); 2372log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted); 3643return ContinueWith(continuationAction, TaskScheduler.Current, default, TaskContinuationOptions.None); 3665return ContinueWith(continuationAction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 3725return ContinueWith(continuationAction, TaskScheduler.Current, default, continuationOptions); 3821return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None); 3844return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 3906return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions); 4006return ContinueWith(continuationFunction, TaskScheduler.Current, default, 4035return ContinueWith(continuationFunction, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 4101return ContinueWith(continuationFunction, TaskScheduler.Current, default, continuationOptions); 4206return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, 4236return ContinueWith(continuationFunction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); 4304return ContinueWith(continuationFunction, state, TaskScheduler.Current, default, continuationOptions); 4512log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, CurrentId ?? 0, continuationTask.Id);
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\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.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
248if (RunContinuationsAsynchronously || ts != TaskScheduler.Current) 332ts = TaskScheduler.Current;
System.Threading.Tasks.Parallel (12)
System\Threading\Tasks\Parallel.cs (11)
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\TaskReplicator.cs (1)
126_scheduler = options.TaskScheduler ?? TaskScheduler.Current;
Text.Analyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.Current;