3 types derived from TaskScheduler
mscorlib (3)
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
490
private sealed class ConcurrentExclusiveTaskScheduler :
TaskScheduler
system\threading\Tasks\TaskScheduler.cs (1)
636
internal sealed class SynchronizationContextTaskScheduler :
TaskScheduler
system\threading\Tasks\ThreadPoolTaskScheduler.cs (1)
30
internal sealed class ThreadPoolTaskScheduler:
TaskScheduler
354 references to TaskScheduler
mscorlib (293)
system\io\filestream.cs (1)
2865
TaskScheduler
.Default);
system\io\stream.cs (3)
286
cancellationToken, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
531
TaskScheduler
.Default);
545
readWriteTask.m_taskScheduler =
TaskScheduler
.Default;
system\io\textreader.cs (2)
200
return Task<String>.Factory.StartNew(_ReadLineDelegate, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
240
return Task<int>.Factory.StartNew(_ReadDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
system\io\textwriter.cs (7)
544
return Task.Factory.StartNew(_WriteCharDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
552
return Task.Factory.StartNew(_WriteStringDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
568
return Task.Factory.StartNew(_WriteCharArrayRangeDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
576
return Task.Factory.StartNew(_WriteLineCharDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
584
return Task.Factory.StartNew(_WriteLineStringDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
600
return Task.Factory.StartNew(_WriteLineCharArrayRangeDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
614
return Task.Factory.StartNew(_FlushDelegate, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
system\runtime\compilerservices\TaskAwaiter.cs (2)
251
(currentTaskAtBegin != null ? currentTaskAtBegin.m_taskScheduler.Id :
TaskScheduler
.Default.Id),
276
(currentTaskAtEnd != null ? currentTaskAtEnd.m_taskScheduler.Id :
TaskScheduler
.Default.Id),
system\runtime\compilerservices\YieldAwaitable.cs (4)
108
TaskScheduler
scheduler =
TaskScheduler
.Current;
109
if (scheduler ==
TaskScheduler
.Default)
133
TplEtwProvider.Log.AwaitTaskContinuationScheduled(
TaskScheduler
.Current.Id, (currentTask != null) ? currentTask.Id : 0, continuationId);
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (9)
46
private readonly
TaskScheduler
m_underlyingTaskScheduler;
80
this(
TaskScheduler
.Default, DefaultMaxConcurrencyLevel, DEFAULT_MAXITEMSPERTASK) { }
86
public ConcurrentExclusiveSchedulerPair(
TaskScheduler
taskScheduler) :
94
public ConcurrentExclusiveSchedulerPair(
TaskScheduler
taskScheduler, int maxConcurrencyLevel) :
104
public ConcurrentExclusiveSchedulerPair(
TaskScheduler
taskScheduler, int maxConcurrencyLevel, int maxItemsPerTask)
251
public
TaskScheduler
ConcurrentScheduler { get { return m_concurrentTaskScheduler; } }
256
public
TaskScheduler
ExclusiveScheduler { get { return m_exclusiveTaskScheduler; } }
573
bool isDefaultScheduler = m_pair.m_underlyingTaskScheduler ==
TaskScheduler
.Default;
713
public
TaskScheduler
TargetScheduler { get { return m_pair.m_underlyingTaskScheduler; } }
system\threading\Tasks\Future.cs (38)
331
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler,
351
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler) :
362
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler, ref StackCrawlMark stackMark) :
381
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler) :
393
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
418
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
738
return ContinueWith(continuationAction,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
766
return ContinueWith(continuationAction,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
778
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
793
public Task ContinueWith(Action<Task<TResult>> continuationAction,
TaskScheduler
scheduler)
831
return ContinueWith(continuationAction,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
850
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
874
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
881
internal Task ContinueWith(Action<Task<TResult>> continuationAction,
TaskScheduler
scheduler, CancellationToken cancellationToken,
938
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
967
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
980
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
995
public Task ContinueWith(Action<Task<TResult>, Object> continuationAction, Object state,
TaskScheduler
scheduler)
1034
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
1054
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
1078
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
1085
internal Task ContinueWith(Action<Task<TResult>, Object> continuationAction, Object state,
TaskScheduler
scheduler, CancellationToken cancellationToken,
1145
return ContinueWith<TNewResult>(continuationFunction,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
1176
return ContinueWith<TNewResult>(continuationFunction,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
1190
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
1205
public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction,
TaskScheduler
scheduler)
1252
return ContinueWith<TNewResult>(continuationFunction,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
1274
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
1305
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
1312
internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction,
TaskScheduler
scheduler,
1372
return ContinueWith<TNewResult>(continuationFunction, state,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
1405
return ContinueWith<TNewResult>(continuationFunction, state,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
1420
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
1436
TaskScheduler
scheduler)
1485
return ContinueWith<TNewResult>(continuationFunction, state,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
1508
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
1539
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
1547
TaskScheduler
scheduler, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
system\threading\Tasks\FutureFactory.cs (39)
53
private
TaskScheduler
m_defaultScheduler;
57
private
TaskScheduler
DefaultScheduler
61
if (m_defaultScheduler == null) return
TaskScheduler
.Current;
67
private
TaskScheduler
GetDefaultScheduler(Task currTask)
74
else return
TaskScheduler
.Default;
88
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
90
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
109
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
111
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
122
/// The <see cref="System.Threading.Tasks.
TaskScheduler
">
132
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
135
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
137
public TaskFactory(
TaskScheduler
scheduler) // null means to use TaskScheduler.Current
164
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is initialized to the
166
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
188
/// The default <see cref="System.Threading.Tasks.
TaskScheduler
">
203
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is initialized to
206
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
208
public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
233
/// Gets the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> of this
239
/// If null, <see cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>
242
public
TaskScheduler
Scheduler { get { return m_defaultScheduler; } }
386
public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
521
public Task<TResult> StartNew(Func<Object, TResult> function, Object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
656
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
676
TaskScheduler
scheduler)
690
TaskScheduler
scheduler,
1584
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
1611
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
1732
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
1759
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
1773
TaskContinuationOptions continuationOptions, CancellationToken cancellationToken,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
1820
TaskContinuationOptions continuationOptions, CancellationToken cancellationToken,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
1984
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2011
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2132
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2159
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2172
TaskContinuationOptions continuationOptions, CancellationToken cancellationToken,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
2220
TaskContinuationOptions continuationOptions, CancellationToken cancellationToken,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
system\threading\Tasks\Parallel.cs (19)
42
private
TaskScheduler
m_scheduler;
58
m_scheduler =
TaskScheduler
.Default;
68
public
TaskScheduler
TaskScheduler
75
internal
TaskScheduler
EffectiveTaskScheduler
79
if (m_scheduler == null) return
TaskScheduler
.Current;
255
TplEtwProvider.Log.ParallelInvokeBegin((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
408
TplEtwProvider.Log.ParallelInvokeEnd((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
1101
TplEtwProvider.Log.ParallelLoopBegin((callingTask != null ? callingTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callingTask != null ? callingTask.Id : 0),
1153
TplEtwProvider.Log.ParallelFork((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
1256
TplEtwProvider.Log.ParallelJoin((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
1322
TplEtwProvider.Log.ParallelLoopEnd((callingTask != null ? callingTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callingTask != null ? callingTask.Id : 0),
1416
TplEtwProvider.Log.ParallelLoopBegin((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
1466
TplEtwProvider.Log.ParallelFork((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
1569
TplEtwProvider.Log.ParallelJoin((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
1635
TplEtwProvider.Log.ParallelLoopEnd((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
3230
TplEtwProvider.Log.ParallelLoopBegin((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
3291
TplEtwProvider.Log.ParallelFork((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
3454
TplEtwProvider.Log.ParallelJoin((currentWorkerTask != null ? currentWorkerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (currentWorkerTask != null ? currentWorkerTask.Id : 0),
3536
TplEtwProvider.Log.ParallelLoopEnd((callerTask != null ? callerTask.m_taskScheduler.Id :
TaskScheduler
.Current.Id), (callerTask != null ? callerTask.Id : 0),
system\threading\Tasks\Task.cs (75)
168
internal
TaskScheduler
m_taskScheduler; // The task scheduler this task runs under.
541
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler, ref StackCrawlMark stackMark)
559
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler)
591
TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler)
975
internal bool FireTaskScheduledIfNeeded(
TaskScheduler
ts)
1035
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>.
1048
Start(
TaskScheduler
.Current);
1053
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>.
1060
/// The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> with which to associate
1071
public void Start(
TaskScheduler
scheduler)
1109
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>.
1118
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>.
1133
InternalRunSynchronously(
TaskScheduler
.Current, waitForCompletion: true);
1138
/// cref="System.Threading.Tasks.
TaskScheduler
">scheduler</see> provided.
1159
public void RunSynchronously(
TaskScheduler
scheduler)
1174
internal void InternalRunSynchronously(
TaskScheduler
scheduler, bool waitForCompletion)
1278
Task creatingTask, Delegate action, object state, CancellationToken cancellationToken,
TaskScheduler
scheduler,
1630
internal
TaskScheduler
ExecutingTaskScheduler
2532
internal virtual Task CreateReplicaTask(Action<object> taskReplicaDelegate, Object stateObject, Task parentTask,
TaskScheduler
taskScheduler,
2789
etwLog.TaskStarted(
TaskScheduler
.Current.Id, 0, this.Id);
2843
etwLog.TaskCompleted(
TaskScheduler
.Current.Id, 0, this.Id, IsFaulted);
2991
var
scheduler =
TaskScheduler
.InternalCurrent;
2992
if (scheduler != null && scheduler !=
TaskScheduler
.Default)
3233
(currentTask != null ? currentTask.m_taskScheduler.Id :
TaskScheduler
.Default.Id), (currentTask != null ? currentTask.Id : 0),
3275
etwLog.TaskWaitEnd(
TaskScheduler
.Default.Id, 0, this.Id);
3403
TaskScheduler
ts = m_taskScheduler;
3755
return ContinueWith(continuationAction,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
3782
return ContinueWith(continuationAction,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
3793
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
3808
public Task ContinueWith(Action<Task> continuationAction,
TaskScheduler
scheduler)
3846
return ContinueWith(continuationAction,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
3865
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
3889
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
3896
private Task ContinueWith(Action<Task> continuationAction,
TaskScheduler
scheduler,
3953
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, default(CancellationToken), TaskContinuationOptions.None, ref stackMark);
3981
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
3993
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
4008
public Task ContinueWith(Action<Task, Object> continuationAction, Object state,
TaskScheduler
scheduler)
4047
return ContinueWith(continuationAction, state,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
4067
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
4091
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
4098
private Task ContinueWith(Action<Task, Object> continuationAction, Object state,
TaskScheduler
scheduler,
4158
return ContinueWith<TResult>(continuationFunction,
TaskScheduler
.Current, default(CancellationToken),
4190
return ContinueWith<TResult>(continuationFunction,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
4204
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
4219
public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction,
TaskScheduler
scheduler)
4260
return ContinueWith<TResult>(continuationFunction,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
4282
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
4306
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
4313
private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction,
TaskScheduler
scheduler,
4373
return ContinueWith<TResult>(continuationFunction, state,
TaskScheduler
.Current, default(CancellationToken),
4406
return ContinueWith<TResult>(continuationFunction, state,
TaskScheduler
.Current, cancellationToken, TaskContinuationOptions.None, ref stackMark);
4421
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its execution.
4436
public Task<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state,
TaskScheduler
scheduler)
4478
return ContinueWith<TResult>(continuationFunction, state,
TaskScheduler
.Current, default(CancellationToken), continuationOptions, ref stackMark);
4501
/// The <see cref="
TaskScheduler
"/> to associate with the continuation task and to use for its
4525
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
4532
private Task<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state,
TaskScheduler
scheduler,
4632
TaskScheduler
scheduler,
4694
etwLog.AwaitTaskContinuationScheduled(
TaskScheduler
.Current.Id, Task.CurrentId ?? 0, continuationTask.Id);
5617
return Task.InternalStartNew(null, action, null, default(CancellationToken),
TaskScheduler
.Default,
5637
return Task.InternalStartNew(null, action, null, cancellationToken,
TaskScheduler
.Default,
5654
TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None,
TaskScheduler
.Default, ref stackMark);
5674
TaskCreationOptions.DenyChildAttach, InternalTaskOptions.None,
TaskScheduler
.Default, ref stackMark);
5721
Task<Task> task1 = Task<Task>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
5772
Task<Task<TResult>> task1 = Task<Task<TResult>>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach,
TaskScheduler
.Default);
6557
TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.DenyChildAttach,
TaskScheduler
.Default);
6586
TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.DenyChildAttach,
TaskScheduler
.Default);
6765
internal override Task CreateReplicaTask(Action<object> taskReplicaDelegate, Object stateObject, Task parentTask,
TaskScheduler
taskScheduler,
6786
internal ParallelForReplicaTask(Action<object> taskReplicaDelegate, Object stateObject, Task parentTask,
TaskScheduler
taskScheduler,
6833
/// A hint to a <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> to schedule a
6841
/// <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> that oversubscription may be
6924
/// A hint to a <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> to schedule a
6932
/// a hint to the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> that
system\threading\Tasks\TaskContinuation.cs (13)
297
private readonly
TaskScheduler
m_taskScheduler;
303
internal StandardTaskContinuation(Task task, TaskContinuationOptions options,
TaskScheduler
scheduler)
428
etwLog.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ??
TaskScheduler
.Default).Id, task.Id, m_continuationId);
484
private readonly
TaskScheduler
m_scheduler;
493
TaskScheduler
scheduler, Action action, bool flowExecutionContext, ref StackCrawlMark stackMark) :
506
if (m_scheduler ==
TaskScheduler
.Default)
519
(
TaskScheduler
.InternalCurrent == m_scheduler || Thread.CurrentThread.IsThreadPoolThread);
588
protected Task CreateTask(Action<object> action, object state,
TaskScheduler
scheduler)
622
etwLog.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ??
TaskScheduler
.Default).Id, task.Id, m_continuationId);
657
var
sched =
TaskScheduler
.InternalCurrent;
658
return sched == null || sched ==
TaskScheduler
.Default;
833
etwLog.AwaitTaskContinuationScheduled((task.ExecutingTaskScheduler ??
TaskScheduler
.Default).Id, task.Id, atc.m_continuationId);
system\threading\Tasks\TaskExceptionHolder.cs (1)
140
TaskScheduler
.PublishUnobservedTaskException(m_task, ueea);
system\threading\Tasks\TaskFactory.cs (48)
48
private
TaskScheduler
m_defaultScheduler;
53
private
TaskScheduler
DefaultScheduler
57
if (m_defaultScheduler == null) return
TaskScheduler
.Current;
63
private
TaskScheduler
GetDefaultScheduler(Task currTask)
70
else return
TaskScheduler
.Default;
88
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
90
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
109
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
111
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
122
/// The <see cref="System.Threading.Tasks.
TaskScheduler
">
132
/// and the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is
135
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
137
public TaskFactory(
TaskScheduler
scheduler) // null means to use TaskScheduler.Current
164
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is initialized to the
166
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
188
/// The default <see cref="System.Threading.Tasks.
TaskScheduler
">
203
/// cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> property is initialized to
206
/// cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>).
208
public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
250
/// Gets the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> of this
256
/// If null, <see cref="System.Threading.Tasks.
TaskScheduler
.Current">TaskScheduler.Current</see>
259
public
TaskScheduler
Scheduler { get { return m_defaultScheduler; } }
398
public Task StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
408
internal Task StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions,
TaskScheduler
scheduler)
541
TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
681
public Task<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
830
TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
902
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
922
TaskScheduler
scheduler)
933
TaskScheduler
scheduler,
1283
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
1300
IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod, TaskCreationOptions creationOptions,
TaskScheduler
scheduler)
1891
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
1918
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2040
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2067
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2199
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2226
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2364
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2391
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2634
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2661
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2793
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2820
TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
2955
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
2982
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
3104
/// <param name="scheduler">The <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
3131
CancellationToken cancellationToken, TaskContinuationOptions continuationOptions,
TaskScheduler
scheduler)
system\threading\Tasks\TaskScheduler.cs (32)
36
/// <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> acts as the extension point for all
41
/// All members of the abstract <see cref="
TaskScheduler
"/> type are thread-safe
85
/// A class derived from <see cref="
TaskScheduler
">TaskScheduler</see> implements this function to
128
/// A class derived from <see cref="
TaskScheduler
"/> implements this method in order to support
168
/// <see cref="
TaskScheduler
"/> is able to support.
197
TaskScheduler
ets = task.ExecutingTaskScheduler;
285
private static ConditionalWeakTable<
TaskScheduler
, object> s_activeTaskSchedulers;
288
private static readonly
TaskScheduler
s_defaultTaskScheduler = new ThreadPoolTaskScheduler();
304
/// Initializes the <see cref="System.Threading.Tasks.
TaskScheduler
"/>.
321
ConditionalWeakTable<
TaskScheduler
, object> activeTaskSchedulers = s_activeTaskSchedulers;
324
Interlocked.CompareExchange(ref s_activeTaskSchedulers, new ConditionalWeakTable<
TaskScheduler
, object>(), null);
331
/// Gets the default <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> instance.
333
public static
TaskScheduler
Default
342
/// Gets the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
348
public static
TaskScheduler
Current
352
TaskScheduler
current = InternalCurrent;
353
return current ??
TaskScheduler
.Default;
358
/// Gets the <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
364
internal static
TaskScheduler
InternalCurrent
376
/// Creates a <see cref="
TaskScheduler
"/>
386
/// A <see cref="
TaskScheduler
"/> associated with
393
public static
TaskScheduler
FromCurrentSynchronizationContext()
399
/// Gets the unique ID for this <see cref="
TaskScheduler
"/>.
566
/// Provides an array of all active <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see>
573
/// <returns>An array of <see cref="System.Threading.Tasks.
TaskScheduler
">TaskScheduler</see> instances.</returns>
575
internal static
TaskScheduler
[] GetTaskSchedulersForDebugger()
580
return new
TaskScheduler
[] { s_defaultTaskScheduler };
583
ICollection<
TaskScheduler
> schedulers = s_activeTaskSchedulers.Keys;
591
var arr = new
TaskScheduler
[schedulers.Count];
593
foreach (
var
scheduler in arr)
606
private readonly
TaskScheduler
m_taskScheduler;
607
public SystemThreadingTasks_TaskSchedulerDebugView(
TaskScheduler
scheduler)
System.Core (28)
System\Linq\Parallel\Merging\DefaultMergeHelper.cs (2)
37
private
TaskScheduler
m_taskScheduler; // The task manager to execute the query.
50
TaskScheduler
taskScheduler, CancellationState cancellationState, int queryId)
System\Linq\Parallel\Merging\MergeExecutor.cs (1)
55
PartitionedStream<TInputOutput, TKey> partitions, bool ignoreOutput, ParallelMergeOptions options,
TaskScheduler
taskScheduler, bool isOrdered,
System\Linq\Parallel\Merging\OrderPreservingMergeHelper.cs (2)
32
private
TaskScheduler
m_taskScheduler; // The task manager to execute the query.
42
internal OrderPreservingMergeHelper(PartitionedStream<TInputOutput, TKey> partitions,
TaskScheduler
taskScheduler,
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (2)
46
private readonly
TaskScheduler
m_taskScheduler; // The task manager to execute the query.
116
TaskScheduler
taskScheduler,
System\Linq\Parallel\QueryOperators\PartitionedStreamMerger.cs (2)
28
private
TaskScheduler
m_taskScheduler;
48
internal PartitionedStreamMerger(bool forEffectMerge, ParallelMergeOptions mergeOptions,
TaskScheduler
taskScheduler, bool outputOrdered,
System\Linq\Parallel\QueryOperators\QueryOperator.cs (1)
280
TaskScheduler
taskScheduler = settings.TaskScheduler;
System\Linq\Parallel\QueryOperators\QuerySettings.cs (5)
34
private
TaskScheduler
m_taskScheduler;
52
internal
TaskScheduler
TaskScheduler
89
internal QuerySettings(
TaskScheduler
taskScheduler, int? degreeOfParallelism,
133
TaskScheduler
tm = (this.TaskScheduler == null) ? settings2.TaskScheduler : this.TaskScheduler;
186
settings.TaskScheduler =
TaskScheduler
.Default;
System\Linq\Parallel\Scheduling\OrderPreservingPipeliningSpoolingTask.cs (3)
28
private readonly
TaskScheduler
m_taskScheduler; // The task manager to execute the query.
66
TaskScheduler
taskScheduler,
155
TaskScheduler
taskScheduler, bool autoBuffered)
System\Linq\Parallel\Scheduling\OrderPreservingSpoolingTask.cs (1)
76
Shared<TInputOutput[]> results,
TaskScheduler
taskScheduler)
System\Linq\Parallel\Scheduling\QueryTask.cs (4)
64
internal Task RunSynchronously(
TaskScheduler
taskScheduler)
66
Contract.Assert(taskScheduler ==
TaskScheduler
.Default, "PLINQ queries can currently execute only on the default scheduler.");
82
internal Task RunAsynchronously(
TaskScheduler
taskScheduler)
84
Contract.Assert(taskScheduler ==
TaskScheduler
.Default, "PLINQ queries can currently execute only on the default scheduler.");
System\Linq\Parallel\Scheduling\SpoolingTask.cs (3)
39
SynchronousChannel<TInputOutput>[] channels,
TaskScheduler
taskScheduler)
92
AsynchronousChannel<TInputOutput>[] channels,
TaskScheduler
taskScheduler)
137
QueryTaskGroupState groupState, PartitionedStream<TInputOutput, TIgnoreKey> partitions,
TaskScheduler
taskScheduler)
System\Linq\Parallel\Utils\PLINQETWProvider.cs (1)
44
private static readonly int s_defaultSchedulerId =
TaskScheduler
.Default.Id;
System\Linq\ParallelEnumerable.cs (1)
303
internal static ParallelQuery<TSource> WithTaskScheduler<TSource>(this ParallelQuery<TSource> source,
TaskScheduler
taskScheduler)
System.Data (30)
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (2)
258
}, cancellationTokenSource.Token, TaskContinuationOptions.LongRunning,
TaskScheduler
.Default);
290
},
TaskScheduler
.Default);
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (4)
528
},
TaskScheduler
.Default);
769
},
TaskScheduler
.Default);
1009
},
TaskScheduler
.Default).Unwrap();
1810
},
TaskScheduler
.Default).Unwrap();
fx\src\data\System\Data\SqlClient\SqlCommand.cs (11)
1302
globalCompletion.Task.ContinueWith((t) => callback(t),
TaskScheduler
.Default);
1795
globalCompletion.Task.ContinueWith((t) => callback(t),
TaskScheduler
.Default);
2188
globalCompletion.Task.ContinueWith((t) => callback(t),
TaskScheduler
.Default);
2284
},
TaskScheduler
.Default);
2292
},
TaskScheduler
.Default);
2439
},
TaskScheduler
.Default);
2454
}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.NotOnCanceled,
TaskScheduler
.Default);
2503
},
TaskScheduler
.Default);
2563
},
TaskScheduler
.Default);
2566
},
TaskScheduler
.Default).Unwrap();
2607
},
TaskScheduler
.Default);
fx\src\data\System\Data\SqlClient\SqlConnection.cs (2)
1438
completion.Task.ContinueWith(retry.Retry,
TaskScheduler
.Default);
2145
},
TaskScheduler
.Default).Unwrap();
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (3)
4172
retryTask.ContinueWith((t) => CompleteRetryable(t, source, timeoutCancellationSource),
TaskScheduler
.Default);
4616
},
TaskScheduler
.Default).Unwrap();
4634
task.ContinueWith((t) => CompleteRetryable(t, source, objectToDispose),
TaskScheduler
.Default);
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (2)
127
readTask.ContinueWith((t) => callback(t),
TaskScheduler
.Default);
250
},
TaskScheduler
.Default);
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (1)
226
},
TaskScheduler
.Default);
fx\src\data\System\Data\SqlClient\SqlUtil.cs (1)
147
},
TaskScheduler
.Default
fx\src\data\System\Data\SqlClient\TdsParser.cs (4)
8020
},
TaskScheduler
.Default);
8554
},
TaskScheduler
.Default);
8591
execFlushTask.ContinueWith(tsk => ExecuteFlushTaskCallback(tsk, stateObj, completion, taskReleaseConnectionLock),
TaskScheduler
.Default);
9656
},
TaskScheduler
.Default).Unwrap();
System.ServiceModel (2)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
276
}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler,
TaskScheduler
.Default);
309
}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler,
TaskScheduler
.Default);
System.Web (1)
Util\SynchronizationHelper.cs (1)
108
Task newTask = _lastScheduledTask.ContinueWith(_ => SafeWrapCallback(action),
TaskScheduler
.Default);