You.i Engine
CYIThreadHandle Class Reference

Detailed Description

Platform independent thread handle. Can be used to identify a thread.

Instance of CYIThreadHandle can be obtain through the CYIThread class:

if (threadHandle == otherThreadHandle)
{
...
}
else
{
...
}

You can also obtain the CYIThreadHandle of a running thread.

std::unique_ptr<CYIThread> pThread = std::make_unique<CYIThread>();
pThread->StartThread();
CYIThread::Sleep(100); // to ensure the thread is running.
CYIThreadHandle threadHandle = pThread->GetThreadId();
See also
CYIThread

#include <thread/YiThreadHandle.h>

Public Member Functions

 CYIThreadHandle ()
 
 CYIThreadHandle (CYIThreadHandlePriv *pPrivObj)
 
 CYIThreadHandle (const CYIThreadHandle &hnd)
 
 ~CYIThreadHandle ()
 
CYIThreadHandleoperator= (const CYIThreadHandle &hnd)
 

Friends

bool operator== (const CYIThreadHandle &hnd1, const CYIThreadHandle &hnd2)
 
bool operator!= (const CYIThreadHandle &hnd1, const CYIThreadHandle &hnd2)
 

Constructor & Destructor Documentation

◆ CYIThreadHandle() [1/3]

CYIThreadHandle::CYIThreadHandle ( )

◆ CYIThreadHandle() [2/3]

CYIThreadHandle::CYIThreadHandle ( CYIThreadHandlePriv *  pPrivObj)
explicit

◆ CYIThreadHandle() [3/3]

CYIThreadHandle::CYIThreadHandle ( const CYIThreadHandle hnd)

◆ ~CYIThreadHandle()

CYIThreadHandle::~CYIThreadHandle ( )

Member Function Documentation

◆ operator=()

CYIThreadHandle& CYIThreadHandle::operator= ( const CYIThreadHandle hnd)

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const CYIThreadHandle hnd1,
const CYIThreadHandle hnd2 
)
friend

◆ operator==

bool operator== ( const CYIThreadHandle hnd1,
const CYIThreadHandle hnd2 
)
friend

The documentation for this class was generated from the following file: