Method | Description | |
---|---|---|
AddThread ( ) : void |
Adds a thread to the manager.
|
|
AddThread ( Action |
Adds a thread to the manager.
|
|
Dispose ( ) : void |
Releases threads and resources used by the thread manager.
|
|
EnqueueTask ( Action |
Gives the thread manager a new task to run.
|
|
EnqueueTaskSequentially ( Action |
Enqueues a task. This method also does not perform any locking; it should only be called when all worker threads of the thread pool are idle and all calls to this method are from the same thread.
|
|
ForLoop ( int startIndex, int endIndex, Action |
Loops from the starting index (inclusive) to the ending index (exclusive), calling the loopBody at each iteration. The forLoop function will not return until all iterations are complete. This is meant to be used in a 'fork-join' model; only a single thread should be running a forLoop at any time.
|
|
RemoveThread ( ) : void |
Removes a thread and blocks until success.
|
|
ShutDown ( ) : void |
Tells every thread in the thread manager to shut down and waits until completion.
|
|
SimpleThreadManager ( ) : System |
Constructs the thread manager.
|
|
WaitForTaskCompletion ( ) : void |
Blocks the current thread until all tasks have been completed.
|
Method | Description | |
---|---|---|
DoLoopSection ( object o ) : void | ||
RemakeLoopSections ( ) : void |
public AddThread ( Action | ||
initialization | Action | A function to run to perform any initialization on the new thread. |
initializationInformation | object | Data to give the ParameterizedThreadStart for initialization. |
return | void |
public EnqueueTask ( Action | ||
task | Action | Task to run. |
taskInformation | object | Information to be used by the task. |
return | void |
public EnqueueTaskSequentially ( Action | ||
task | Action | Task to enqueue. |
taskInformation | object | Information for the task. |
return | void |
public ForLoop ( int startIndex, int endIndex, Action |
||
startIndex | int | Inclusive starting index. |
endIndex | int | Exclusive ending index. |
loopBody | Action |
Function that handles an individual iteration of the loop. |
return | void |