XII Release 0.1.0
Loading...
Searching...
No Matches
xiiOSThread Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <OSThread.h>

Inheritance diagram for xiiOSThread:
[legend]

Public Member Functions

 xiiOSThread (xiiOSThreadEntryPoint threadEntryPoint, void *pUserData=nullptr, xiiStringView sName="xiiOSThread", xiiUInt32 uiStackSize=128 *1024)
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

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

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

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.

Constructor & Destructor Documentation

◆ xiiOSThread()

xiiOSThread::xiiOSThread ( xiiOSThreadEntryPoint threadEntryPoint,
void * pUserData = nullptr,
xiiStringView sName = "xiiOSThread",
xiiUInt32 uiStackSize = 128 * 1024 )

Initializes the thread instance (e.g. thread creation etc.)

Note that the thread won't start execution until Start() is called. Please note that szName must be valid until Start() has been called!

Member Function Documentation

◆ GetThreadID()

const xiiThreadID & xiiOSThread::GetThreadID ( ) const
inline

Returns the thread ID of the thread object, may be used in comparison operations with xiiThreadUtils::GetCurrentThreadID() for example.

◆ Join()

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).

◆ Start()

void xiiOSThread::Start ( )

Starts the thread.

Attempts to acquire an exclusive lock for this mutex object.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Threading/Implementation/OSThread.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Platform/Implementation/Posix/OSThread_posix.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Platform/Implementation/Windows/OSThread_win.h