Add a function to test whether the current thread is the main thread.

This commit is contained in:
Jonathan G Rennison
2016-02-16 19:53:22 +00:00
parent 48e4c35fdc
commit e89efa8581
7 changed files with 48 additions and 0 deletions

View File

@@ -122,4 +122,14 @@ private:
*/
uint GetCPUCoreCount();
/**
* Set the current thread as the "main" thread
*/
void SetSelfAsMainThread();
/**
* @return true if the current thread definitely the "main" thread. If in doubt returns false.
*/
bool IsMainThread();
#endif /* THREAD_H */