Base class for thread implementations. More...
Public Member Functions
|bool||IsRunning () const|
|Determine if the thread is running. |
|Suspend the calling thread until this thread stops. |
|Start the thread execution. |
|Stop the thread execution. |
Static Public Member Functions
|static simba_uint32||GetThreadId ()|
|Get the ID of the calling thread. |
|static void||StartDetachedThread (ThreadFunctionPointer in_threadFunction, void *in_parameters)|
|Run a function on a detached thread. |
Protected Member Functions
|virtual void||DoExecute ()=0|
|Execution function that will be called from Execute() once the thread starts execution. |
|virtual void||DoStop ()|
|Stop function that will be called from Stop(). |
|Thread (INotifiable *in_notifiable=NULL)|
|Critical section for the thread. |
Base class for thread implementations.
|in_notifiable||Object that will be notified when the thread terminates. Can be NULL if no object should be notified. (NOT OWN)|
|virtual void DoExecute||(||)||
Execution function that will be called from Execute() once the thread starts execution.
Subclasses of Thread should override this function to implement their functionality.
This function should execute until the thread finishes, and then exit to terminate the thread.
|virtual void DoStop||(||)||
|static simba_uint32 GetThreadId||(||)||
Get the ID of the calling thread.
|bool IsRunning||(||)|| const
Determine if the thread is running.
Suspend the calling thread until this thread stops.
Start the thread execution.
|ErrorException||if the thread has already been started.|
|static void StartDetachedThread||(||ThreadFunctionPointer||in_threadFunction,|
Run a function on a detached thread.
|in_threadFunction||A pointer to the function to run.|
|in_parameters||A pointer to possible parameters. It is up to the function to interpret the parameters. NULL is allowed.|
Stop the thread execution.
Note that this will not stop the thread immediately, it will wait for the thread execution to check the running flag and stop of its own accord.