Table of Contents

Class CurrentThreadTaskScheduler

Namespace
Hi.Parallels
Assembly
HiGeom.dll

A task scheduler that executes tasks on the current thread.

public class CurrentThreadTaskScheduler : TaskScheduler
Inheritance
CurrentThreadTaskScheduler
Inherited Members
Extension Methods

Methods

GetScheduledTasks()

Gets the tasks currently scheduled on this scheduler.

protected override IEnumerable<Task> GetScheduledTasks()

Returns

IEnumerable<Task>

An empty enumerable since this scheduler doesn't queue tasks.

QueueTask(Task)

Queues a task to the scheduler, which immediately executes it on the current thread.

protected override void QueueTask(Task task)

Parameters

task Task

The task to be executed.

TryExecuteTaskInline(Task, bool)

Tries to execute a task synchronously on the current thread.

protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)

Parameters

task Task

The task to be executed.

taskWasPreviouslyQueued bool

Whether the task was previously queued to the scheduler.

Returns

bool

Always returns true since the task is always executed.