Метод | Описание | |
---|---|---|
AddTask ( System.Action task ) : void |
Add a task to the queue
|
|
Dispose ( ) : void |
Ensure the wait handles are closed
|
|
Finish ( ) : void |
Wait for the tasks to finish executing. After calling finish, you can't add any more tasks to this runner. |
|
FlushTasks ( ) : void |
Wait for all currenty added tasks to finish executing and continue waiting for tasks
|
|
TaskExecutor ( ) : System |
Initializes a new instance of the TaskExecutor class. The WorkerCount is set to the Number of cores
|
|
TaskExecutor ( int workerCount ) : System |
Initializes a new instance of the TaskExecutor class.
|
|
TaskExecutor ( int workerCount, bool highPriority, string name ) : System |
Initializes a new instance of the TaskExecutor class.
|
Метод | Описание | |
---|---|---|
RunPendingTasks ( ) : void |
Run tasks in the queue
|
|
RunTask ( System.Action task ) : void | ||
RunWorker ( ) : void |
Start running the tasks
|
public AddTask ( System.Action task ) : void | ||
task | System.Action | Task to add |
Результат | void |
public TaskExecutor ( int workerCount ) : System | ||
workerCount | int | Number of workers to use |
Результат | System |
public TaskExecutor ( int workerCount, bool highPriority, string name ) : System | ||
workerCount | int | Worker count |
highPriority | bool | High priority workers |
name | string | Name of this task runner ( used in thread names ) |
Результат | System |