C# Класс 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.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

Метод Описание
ConnectToIdle ( ) : void
DisconnectFromIdle ( ) : void
GetAvailableTask ( object tag, IdleTimeAsyncTask &worker ) : bool
OnIdle ( object sender, EventArgs e ) : void

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

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

Removes tasks associated with a give callback
public CancelTasks ( object tag ) : void
tag object
Результат void

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

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
Результат void

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

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
Результат void

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

public IdleTimeAsyncTaskQueue ( IEditorShell shell ) : System
shell IEditorShell
Результат System

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

public IncreasePriority ( object tag ) : void
tag object
Результат void