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::CYIThreadHandle ( )
CYIThreadHandle::CYIThreadHandle ( CYIThreadHandlePriv *  pPrivObj)
explicit
CYIThreadHandle::CYIThreadHandle ( const CYIThreadHandle hnd)
CYIThreadHandle::~CYIThreadHandle ( )

Member Function Documentation

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

Friends And Related Function Documentation

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

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