C# Class CqlSharp.Threading.ActiveThreadScheduler

Runs all tasks on the thread used to create the scheduler
Inheritance: System.Threading.Tasks.TaskScheduler
Afficher le fichier Open project: reuzel/CqlSharp

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

ActiveThreadScheduler() public méthode

Initializes a new instance of the ActiveThreadScheduler class.
public ActiveThreadScheduler ( ) : System
Résultat System

ActiveThreadScheduler() public méthode

Initializes a new instance of the ActiveThreadScheduler class.
thread
public ActiveThreadScheduler ( Thread thread ) : System
thread Thread The thread.
Résultat System

Complete() public méthode

Signal to this scheduler that no more tasks are expected to arrive on this scheduler
public Complete ( ) : void
Résultat void

ExecuteTasks() public méthode

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
Résultat void

GetScheduledTasks() protected méthode

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
Résultat IEnumerable

QueueTask() protected méthode

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.
Résultat void

TryExecuteTaskInline() protected méthode

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. ///
Résultat bool