Provides a scheduler that uses STA threads.
More...
Inherits TaskScheduler, and IDisposable.
|
| TStaTaskScheduler (int numberOfThreads) |
| Initializes a new instance of the StaTaskScheduler class with the specified concurrency level. More...
|
|
void | Dispose () |
| Cleans up the scheduler by indicating that no more tasks will be queued. This method blocks until all threads successfully shutdown. More...
|
|
|
override void | QueueTask (Task task) |
| Queues a Task to be executed by this scheduler. More...
|
|
override IEnumerable< Task > | GetScheduledTasks () |
| Provides a list of the scheduled tasks for the debugger to consume. More...
|
|
override bool | TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) |
| Determines whether a Task may be inlined. More...
|
|
Provides a scheduler that uses STA threads.
Initializes a new instance of the StaTaskScheduler class with the specified concurrency level.
- Parameters
-
numberOfThreads | The number of threads that should be created and used by this scheduler. |
Cleans up the scheduler by indicating that no more tasks will be queued. This method blocks until all threads successfully shutdown.
override IEnumerable<Task> GetScheduledTasks |
( |
| ) |
|
|
protected |
Provides a list of the scheduled tasks for the debugger to consume.
- Returns
- An enumerable of all tasks currently scheduled.
override void QueueTask |
( |
Task |
task | ) |
|
|
protected |
Queues a Task to be executed by this scheduler.
- Parameters
-
task | The task to be executed. |
override bool TryExecuteTaskInline |
( |
Task |
task, |
|
|
bool |
taskWasPreviouslyQueued |
|
) |
| |
|
protected |
Determines whether a Task may be inlined.
- Parameters
-
task | The task to be executed. |
taskWasPreviouslyQueued | Whether the task was previously queued. |
- Returns
- true if the task was successfully inlined; otherwise, false.
override int MaximumConcurrencyLevel |
|
get |
Gets the maximum concurrency level supported by this scheduler.