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)
281
return (TaskScheduler.
Current
== TaskScheduler.Default) &&
Metrics (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Metrics.Legacy (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private 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)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.Threading.Package (1)
ParallelExtensions.NetFramework.cs (1)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;
Microsoft.CodeAnalysis.Workspaces (8)
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (3)
166
Contract.ThrowIfFalse(TaskScheduler.
Current
== this.Storage.Scheduler.ConcurrentScheduler);
225
Contract.ThrowIfFalse(TaskScheduler.
Current
== this.Storage.Scheduler.ExclusiveScheduler);
364
Contract.ThrowIfFalse(TaskScheduler.
Current
== this.Storage.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage_FlushWrites.cs (1)
35
Contract.ThrowIfFalse(TaskScheduler.
Current
== this.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage_StringIds.cs (3)
49
TaskScheduler.
Current
== this.Scheduler.ExclusiveScheduler ||
50
TaskScheduler.
Current
== this.Scheduler.ConcurrentScheduler);
67
Contract.ThrowIfFalse(TaskScheduler.
Current
== this.Scheduler.ExclusiveScheduler);
Storage\SQLite\v2\SQLitePersistentStorage+PooledConnection.cs (1)
42
var 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)
118
task.ContinueWith(t => EndInvokeDotNetAfterTask(t, jsRuntime, invocationInfo), TaskScheduler.
Current
);
123
valueTaskResult.AsTask().ContinueWith(t => EndInvokeDotNetAfterTask(t, jsRuntime, invocationInfo), TaskScheduler.
Current
);
131
innerTask!.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)
87
private 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)
95
TaskScheduler scheduler = TaskScheduler.
Current
;
136
TaskScheduler scheduler = TaskScheduler.
Current
;
157
TplEventSource.Log.AwaitTaskContinuationScheduled(TaskScheduler.
Current
.Id, (currentTask != null) ? currentTask.Id : 0, continuationId);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (12)
629
return ContinueWith(continuationAction, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
652
return ContinueWith(continuationAction, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
713
return ContinueWith(continuationAction, TaskScheduler.
Current
, default, continuationOptions);
810
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
834
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
897
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, default, continuationOptions);
998
return ContinueWith(continuationFunction, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
1027
return ContinueWith(continuationFunction, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
1099
return ContinueWith(continuationFunction, TaskScheduler.
Current
, default, continuationOptions);
1212
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
1243
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
1319
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, default, continuationOptions);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (7)
38
private 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)
144
TaskScheduler ts = TaskScheduler.
Current
;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (17)
916
Start(TaskScheduler.
Current
);
1001
InternalRunSynchronously(TaskScheduler.
Current
, waitForCompletion: true);
2318
log.TaskStarted(TaskScheduler.
Current
.Id, 0, this.Id);
2372
log.TaskCompleted(TaskScheduler.
Current
.Id, 0, this.Id, IsFaulted);
3643
return ContinueWith(continuationAction, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
3665
return ContinueWith(continuationAction, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
3725
return ContinueWith(continuationAction, TaskScheduler.
Current
, default, continuationOptions);
3821
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, default, TaskContinuationOptions.None);
3844
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
3906
return ContinueWith(continuationAction, state, TaskScheduler.
Current
, default, continuationOptions);
4006
return ContinueWith(continuationFunction, TaskScheduler.
Current
, default,
4035
return ContinueWith(continuationFunction, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
4101
return ContinueWith(continuationFunction, TaskScheduler.
Current
, default, continuationOptions);
4206
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, default,
4236
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, cancellationToken, TaskContinuationOptions.None);
4304
return ContinueWith(continuationFunction, state, TaskScheduler.
Current
, default, continuationOptions);
4512
log.AwaitTaskContinuationScheduled(TaskScheduler.
Current
.Id, CurrentId ?? 0, continuationTask.Id);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (7)
42
private 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)
248
if (RunContinuationsAsynchronously || ts != TaskScheduler.
Current
)
332
ts = TaskScheduler.
Current
;
System.Threading.Tasks.Parallel (12)
System\Threading\Tasks\Parallel.cs (11)
64
internal TaskScheduler EffectiveTaskScheduler => _scheduler ?? TaskScheduler.
Current
;
221
ParallelEtwProvider.Log.ParallelInvokeBegin(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0,
367
ParallelEtwProvider.Log.ParallelInvokeEnd(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID);
973
ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0,
1010
ParallelEtwProvider.Log.ParallelFork(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID);
1110
ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID);
1155
ParallelEtwProvider.Log.ParallelLoopEnd(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID, long.CreateTruncating(nTotalIterations));
2540
ParallelEtwProvider.Log.ParallelLoopBegin(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0,
2601
ParallelEtwProvider.Log.ParallelFork(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID);
2747
ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.
Current
.Id, Task.CurrentId ?? 0, forkJoinContextID);
2795
ParallelEtwProvider.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)
87
private static TaskScheduler EffectiveTaskScheduler(ParallelOptions options) => options.TaskScheduler ?? TaskScheduler.
Current
;