C# Class Microsoft.Languages.Editor.Tasks.IdleTimeAsyncTaskQueue

A queue of asynchronous tasks that are processed in the order they were added. As opposed to thread pool tasks only start on idle and queued task may be canceled if needed. There may be one or more tasks running in parallel depending on number of CPUs avaialable.
Afficher le fichier Open project: Microsoft/RTVS Class Usage Examples

Méthodes publiques

Méthode Description
CancelTasks ( object tag ) : void

Removes tasks associated with a give callback

Enqueue ( Func taskAction, Action callbackAction, Action cancelAction, object tag ) : void

Add task to the idle time queue. Tasks are executed asynchronously in the order they were added. On next idle time if thread is available it will take task from the head of the queue and execute it. There may be one or more tasks running in parallel depending on number of CPUs avaialable.

Enqueue ( Func taskAction, Action callbackAction, object tag ) : void

Add task to the idle time queue. Tasks are executed asynchronously in the order they were added. On next idle time if thread is available it will take task from the head of the queue and execute it. There may be one or more tasks running in parallel depending on number of CPUs avaialable.

IdleTimeAsyncTaskQueue ( IEditorShell shell ) : System
IncreasePriority ( object tag ) : void

Private Methods

Méthode Description
ConnectToIdle ( ) : void
DisconnectFromIdle ( ) : void
GetAvailableTask ( object tag, IdleTimeAsyncTask &worker ) : bool
OnIdle ( object sender, EventArgs e ) : void

Method Details

CancelTasks() public méthode

Removes tasks associated with a give callback
public CancelTasks ( object tag ) : void
tag object
Résultat void

Enqueue() public méthode

Add task to the idle time queue. Tasks are executed asynchronously in the order they were added. On next idle time if thread is available it will take task from the head of the queue and execute it. There may be one or more tasks running in parallel depending on number of CPUs avaialable.
public Enqueue ( Func taskAction, Action callbackAction, Action cancelAction, object tag ) : void
taskAction Func
callbackAction Action
cancelAction Action
tag object
Résultat void

Enqueue() public méthode

Add task to the idle time queue. Tasks are executed asynchronously in the order they were added. On next idle time if thread is available it will take task from the head of the queue and execute it. There may be one or more tasks running in parallel depending on number of CPUs avaialable.
public Enqueue ( Func taskAction, Action callbackAction, object tag ) : void
taskAction Func
callbackAction Action
tag object
Résultat void

IdleTimeAsyncTaskQueue() public méthode

public IdleTimeAsyncTaskQueue ( IEditorShell shell ) : System
shell IEditorShell
Résultat System

IncreasePriority() public méthode

public IncreasePriority ( object tag ) : void
tag object
Résultat void