C# Класс CqlSharp.Threading.ActiveThreadScheduler

Runs all tasks on the thread used to create the scheduler
Наследование: System.Threading.Tasks.TaskScheduler
Показать файл Открыть проект

Открытые методы

Метод Описание
ActiveThreadScheduler ( ) : System

Initializes a new instance of the ActiveThreadScheduler class.

ActiveThreadScheduler ( Thread thread ) : System

Initializes a new instance of the ActiveThreadScheduler class.

Complete ( ) : void

Signal to this scheduler that no more tasks are expected to arrive on this scheduler

ExecuteTasks ( ) : void

Start execution of tasks Scheduled to this scheduler.

Защищенные методы

Метод Описание
GetScheduledTasks ( ) : IEnumerable

For debugger support only, generates an enumerable of T:System.Threading.Tasks.Task instances currently queued to the scheduler waiting to be executed.

QueueTask ( Task task ) : void

Queues a T:System.Threading.Tasks.Task to the scheduler.

TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool

Determines whether the provided T:System.Threading.Tasks.Task can be executed synchronously in this call, and if it can, executes it.

Приватные методы

Метод Описание
TryTake ( Task &task ) : bool

Tries to take the first task from the set. This operation will block until an task has become available, or no more additions are expected.

Описание методов

ActiveThreadScheduler() публичный Метод

Initializes a new instance of the ActiveThreadScheduler class.
public ActiveThreadScheduler ( ) : System
Результат System

ActiveThreadScheduler() публичный Метод

Initializes a new instance of the ActiveThreadScheduler class.
thread
public ActiveThreadScheduler ( Thread thread ) : System
thread Thread The thread.
Результат System

Complete() публичный Метод

Signal to this scheduler that no more tasks are expected to arrive on this scheduler
public Complete ( ) : void
Результат void

ExecuteTasks() публичный Метод

Start execution of tasks Scheduled to this scheduler.
/// Execute must be called using the same thread as used to construct /// this scheduler ///
public ExecuteTasks ( ) : void
Результат void

GetScheduledTasks() защищенный Метод

For debugger support only, generates an enumerable of T:System.Threading.Tasks.Task instances currently queued to the scheduler waiting to be executed.
/// This scheduler is unable to generate a list of queued tasks at this /// time. ///
protected GetScheduledTasks ( ) : IEnumerable
Результат IEnumerable

QueueTask() защищенный Метод

Queues a T:System.Threading.Tasks.Task to the scheduler.
The argument is null.
protected QueueTask ( Task task ) : void
task Task The to be queued.
Результат void

TryExecuteTaskInline() защищенный Метод

Determines whether the provided T:System.Threading.Tasks.Task can be executed synchronously in this call, and if it can, executes it.
The argument is null. The was already executed.
protected TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool
task Task The to be executed.
taskWasPreviouslyQueued bool /// A Boolean denoting whether or not task has previously been queued. If this /// parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to /// have been queued, and this call is being made in order to execute the task inline without queuing it. ///
Результат bool