![]() |
XII Release 0.1.0
|
Implementation of a thread. More...
#include <OSThread.h>
Public Member Functions | |
xiiOSThread (xiiOSThreadEntryPoint threadEntryPoint, void *pUserData=nullptr, xiiStringView sName="xiiOSThread", xiiUInt32 uiStackSize=128 *1024) | |
Initializes the thread instance (e.g. thread creation etc.) | |
virtual | ~xiiOSThread () |
Destructor. | |
void | Start () |
Starts the thread. | |
void | Join () |
Waits in the calling thread until the thread has finished execution (e.g. returned from the thread function) | |
const xiiThreadID & | GetThreadID () const |
Returns the thread ID of the thread object, may be used in comparison operations with xiiThreadUtils::GetCurrentThreadID() for example. | |
Static Public Member Functions | |
static xiiInt32 | GetThreadCount () |
Returns how many xiiOSThreads are currently active. | |
Protected Attributes | |
xiiThreadHandle | m_hHandle |
xiiThreadID | m_ThreadID |
xiiOSThreadEntryPoint | m_EntryPoint |
void * | m_pUserData |
xiiString | m_sName |
xiiUInt32 | m_uiStackSize |
Implementation of a thread.
Since the thread class needs a platform specific entry-point it is usually recommended to use the xiiThread class instead as the base for long running threads.
xiiOSThread::xiiOSThread | ( | xiiOSThreadEntryPoint | threadEntryPoint, |
void * | pUserData = nullptr, | ||
xiiStringView | sName = "xiiOSThread", | ||
xiiUInt32 | uiStackSize = 128 * 1024 ) |
void xiiOSThread::Join | ( | ) |
Waits in the calling thread until the thread has finished execution (e.g. returned from the thread function)
Releases a lock that has been previously acquired.
Joins with the thread (waits for termination)
void xiiOSThread::Start | ( | ) |
Starts the thread.
Attempts to acquire an exclusive lock for this mutex object.