C# Class UnityThreading.TaskDistributor

Inheritance: DispatcherBase
Show file Open project: ufz-vislab/html-ui-unity Class Usage Examples

Public Properties

Property Type Description
MaxAdditionalWorkerThreads int

Private Properties

Property Type Description
FillTasks void
TasksAdded void

Public Methods

Method Description
Dispose ( ) : void

Disposes all TaskDistributor, worker threads, resources and remaining tasks.

SpawnAdditionalWorkerThread ( ) : void
Start ( ) : void

Starts the TaskDistributor if its not currently running.

TaskDistributor ( string name ) : System

Creates a new instance of the TaskDistributor with ProcessorCount x2 worker threads. The task distributor will auto start his worker threads.

TaskDistributor ( string name, int workerThreadCount ) : System

Creates a new instance of the TaskDistributor. The task distributor will auto start his worker threads.

TaskDistributor ( string name, int workerThreadCount, bool autoStart ) : System

Creates a new instance of the TaskDistributor.

Protected Methods

Method Description
CheckAccessLimitation ( ) : void

Private Methods

Method Description
FillTasks ( Dispatcher target ) : void
TasksAdded ( ) : void

Method Details

CheckAccessLimitation() protected method

protected CheckAccessLimitation ( ) : void
return void

Dispose() public method

Disposes all TaskDistributor, worker threads, resources and remaining tasks.
public Dispose ( ) : void
return void

SpawnAdditionalWorkerThread() public method

public SpawnAdditionalWorkerThread ( ) : void
return void

Start() public method

Starts the TaskDistributor if its not currently running.
public Start ( ) : void
return void

TaskDistributor() public method

Creates a new instance of the TaskDistributor with ProcessorCount x2 worker threads. The task distributor will auto start his worker threads.
public TaskDistributor ( string name ) : System
name string
return System

TaskDistributor() public method

Creates a new instance of the TaskDistributor. The task distributor will auto start his worker threads.
public TaskDistributor ( string name, int workerThreadCount ) : System
name string
workerThreadCount int The number of worker threads, a value below one will create ProcessorCount x2 worker threads.
return System

TaskDistributor() public method

Creates a new instance of the TaskDistributor.
public TaskDistributor ( string name, int workerThreadCount, bool autoStart ) : System
name string
workerThreadCount int The number of worker threads, a value below one will create ProcessorCount x2 worker threads.
autoStart bool Should the instance auto start the worker threads.
return System

Property Details

MaxAdditionalWorkerThreads public property

Amount of additional spawnable worker threads.
public int MaxAdditionalWorkerThreads
return int