Public Member Functions | |
CThread (IRunnable &runnable) | |
Create a thread to run the supplied instance of IRunnable. | |
CThread (const CThread &rhs) | |
~CThread () override | |
CThread & | operator= (const CThread &rhs) |
void | Start () |
Start the thread running. | |
bool | IsRunning () const |
Returns true if the thread is running. | |
void | SetThreadName (const _tstring &threadName) const |
Sets a threads name so that it can be queried in a debugger - NOT SUPPORTED. | |
bool | IsThisThread () const |
Returns true if the thread object represents the thread that is calling IsThisThread(). | |
HANDLE | GetWaitHandle () const override |
void | Wait () const override |
bool | Wait (Milliseconds timeout) const override |
Static Public Member Functions | |
static void | SetCurrentThreadName (const _tstring &threadName) |
Sets the current threads name so that it can be queried in a debugger. | |
static void | SetThreadName (std::thread::id threadID, const _tstring &threadName) |
Sets the supplied threads name so that it can be queried in a debugger. | |
static void | AddThreadNameListener (IListenToThreadNaming &listener) |
static void | RemoveThreadNameListener (IListenToThreadNaming &listener) |
static void | AddThreadStartListener (IListenToThreadStart &listener) |
static void | RemoveThreadStartListener (IListenToThreadStart &listener) |
static void | AddThreadStopListener (IListenToThreadStop &listener) |
static void | RemoveThreadStopListener (IListenToThreadStop &listener) |
Protected Member Functions | |
void | NotifyThreadStartListeners () |
void | NotifyThreadStopListeners () |
Static Protected Member Functions | |
static void | SetThreadName (const _tstring &threadID, const _tstring &threadName) |
Classes | |
struct | ThreadData |
Create a thread to run the supplied instance of IRunnable.
~CThread | ( | ) | [override] |
void Start | ( | ) |
Start the thread running.
bool IsRunning | ( | ) | const |
Returns true if the thread is running.
void SetThreadName | ( | const _tstring & | threadName | ) | const |
Sets a threads name so that it can be queried in a debugger - NOT SUPPORTED.
bool IsThisThread | ( | ) | const |
Returns true if the thread object represents the thread that is calling IsThisThread().
void SetCurrentThreadName | ( | const _tstring & | threadName | ) | [static] |
Sets the current threads name so that it can be queried in a debugger.
void SetThreadName | ( | std::thread::id | threadID, | |
const _tstring & | threadName | |||
) | [static] |
Sets the supplied threads name so that it can be queried in a debugger.
HANDLE GetWaitHandle | ( | ) | const [override] |
void Wait | ( | ) | const [override] |
bool Wait | ( | Milliseconds | timeout | ) | const [override] |
void AddThreadNameListener | ( | IListenToThreadNaming & | listener | ) | [static, inherited] |
void RemoveThreadNameListener | ( | IListenToThreadNaming & | listener | ) | [static, inherited] |
void AddThreadStartListener | ( | IListenToThreadStart & | listener | ) | [static, inherited] |
void RemoveThreadStartListener | ( | IListenToThreadStart & | listener | ) | [static, inherited] |
void AddThreadStopListener | ( | IListenToThreadStop & | listener | ) | [static, inherited] |
void RemoveThreadStopListener | ( | IListenToThreadStop & | listener | ) | [static, inherited] |
void SetThreadName | ( | const _tstring & | threadID, | |
const _tstring & | threadName | |||
) | [static, protected, inherited] |
void NotifyThreadStartListeners | ( | ) | [protected, inherited] |
void NotifyThreadStopListeners | ( | ) | [protected, inherited] |