Hydrogen Framework
1.3.1
|
Public Member Functions | |
virtual bool | Check () |
Checks if the Job is done, and facilitates calling OnFinished when completed. More... | |
abstract void | Start (bool backgroundThread, System.Threading.ThreadPriority priority) |
Start the work process, should probably send the Run function to the thread! More... | |
Protected Member Functions | |
virtual void | Abort () |
Abort the Job (as best we can). More... | |
virtual void | OnFinished () |
Called once by Check when the Job has finished. More... | |
virtual void | Run (object state) |
The launcher of the ThreadedFunction, used to handle the state as well. More... | |
virtual void | ThreadedFunction () |
The work horse function that MUST BE THREAD SAFE. Do not touch the Unity API! It will cause an exception if you do, and things will act like a 4 year old having a tantrum. Debugging should be handled via System.Console and you should be aware that exceptions will not show up in Unity if they happen on the thread; therefore you will never know if its broken so test your code outside of the threading first, or have copius amounts of debugging implemented. More... | |
Properties | |
bool | IsBusy [get, set] |
Is the Job busy working? More... | |
bool | IsDone [get, set] |
Is the Job done? More... | |
bool | FiredOnFinished [get, set] |
Has the OnFinished been called yet? More... | |
The base for all classes which want to extend the behaviour of a Job.
Definition at line 34 of file JobBase.cs.
|
protectedvirtual |
Abort the Job (as best we can).
Reimplemented in Hydrogen.Threading.ThreadedJob.
Definition at line 134 of file JobBase.cs.
|
virtual |
Checks if the Job is done, and facilitates calling OnFinished when completed.
Definition at line 113 of file JobBase.cs.
|
protectedvirtual |
Called once by Check when the Job has finished.
Can use Unity API.
Reimplemented in Hydrogen.Threading.Jobs.MeshCombiner.
Definition at line 145 of file JobBase.cs.
|
protectedvirtual |
The launcher of the ThreadedFunction, used to handle the state as well.
state | Irrelevent / Not Used. Required for the ThreadPool to be used. |
Definition at line 153 of file JobBase.cs.
|
pure virtual |
Start the work process, should probably send the Run function to the thread!
backgroundThread | If set to true the thread will be set to background. |
priority | The thread priority. |
Implemented in Hydrogen.Threading.ThreadedJob, and Hydrogen.Threading.ThreadPoolJob.
|
protectedvirtual |
The work horse function that MUST BE THREAD SAFE. Do not touch the Unity API! It will cause an exception if you do, and things will act like a 4 year old having a tantrum. Debugging should be handled via System.Console and you should be aware that exceptions will not show up in Unity if they happen on the thread; therefore you will never know if its broken so test your code outside of the threading first, or have copius amounts of debugging implemented.
Threading: Because when it works, its awesome.
Reimplemented in Hydrogen.Threading.Jobs.MeshCombiner.
Definition at line 187 of file JobBase.cs.
|
getset |
Has the OnFinished been called yet?
true
if it has; otherwise, false
.
Definition at line 95 of file JobBase.cs.
|
getset |
|
getset |