Added Thread::CurrentThreadId() method to wrap up thread id functionality in a more platform appropriate way.

This commit is contained in:
Robert Osfield
2020-01-06 18:39:51 +00:00
parent 8551f25da0
commit d1ff16614c
11 changed files with 59 additions and 30 deletions

View File

@@ -113,6 +113,11 @@ public:
*/
static Thread *CurrentThread();
/**
* Return the id of the current thread
*/
static size_t CurrentThreadId();
/**
* Initialize Threading in a program. This method must be called before
@@ -147,7 +152,7 @@ public:
*
* @return a unique thread identifier
*/
int getThreadId();
size_t getThreadId();
/**
* Get the thread's process id. This is the pthread_t or pid_t value