C# Class BEPUutilities2.Threading.ParallelLooper

Manages parallel for loops. Cannot handle general task-based parallelism.
Inheritance: IParallelLooper, IDisposable
Show file Open project: RossNordby/scratchpad Class Usage Examples

Public Methods

Method Description
AddThread ( ) : void

Adds a thread to the manager.

AddThread ( System.Action threadStart ) : void

Adds a thread to the manager.

Dispose ( ) : void

Releases resources used by the object.

ForLoop ( int beginIndex, int endIndex, Action loopBody ) : void

Iterates over the interval.

ParallelLooper ( ) : System

Constructs a new parallel loop manager.

RemoveThread ( ) : void

Removes a thread from the manager.

Private Methods

Method Description
OnWorkerFinish ( ) : void

Method Details

AddThread() public method

Adds a thread to the manager.
public AddThread ( ) : void
return void

AddThread() public method

Adds a thread to the manager.
public AddThread ( System.Action threadStart ) : void
threadStart System.Action Initialization to run on the worker thread.
return void

Dispose() public method

Releases resources used by the object.
public Dispose ( ) : void
return void

ForLoop() public method

Iterates over the interval.
public ForLoop ( int beginIndex, int endIndex, Action loopBody ) : void
beginIndex int Starting index of the iteration.
endIndex int Ending index of the iteration.
loopBody Action Function to call on each iteration.
return void

ParallelLooper() public method

Constructs a new parallel loop manager.
public ParallelLooper ( ) : System
return System

RemoveThread() public method

Removes a thread from the manager.
public RemoveThread ( ) : void
return void