Thread class. More...
#include <thread.h>
Public Member Functions | |
Construction | |
CL_Thread () | |
Constructs a thread object. | |
~CL_Thread () | |
Operations | |
| |
void | start (CL_Runnable *runnable) |
Starts a thread. | |
template<class C > | |
void | start (C *instance, void(C::*member)()) |
template<class C , class P1 > | |
void | start (C *instance, void(C::*member)(P1 p1), P1 p1) |
template<class C , class P1 , class P2 > | |
void | start (C *instance, void(C::*member)(P1 p1, P2 p2), P1 p1, P2 p2) |
template<class C , class P1 , class P2 , class P3 > | |
void | start (C *instance, void(C::*member)(P1 p1, P2 p2, P3 p3), P1 p1, P2 p2, P3 p3) |
template<class C , class P1 , class P2 , class P3 , class P4 > | |
void | start (C *instance, void(C::*member)(P1 p1, P2 p2, P3 p3, P4 p4), P1 p1, P2 p2, P3 p3, P4 p4) |
template<class C , class P1 , class P2 , class P3 , class P4 , class P5 > | |
void | start (C *instance, void(C::*member)(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
void | join () |
Blocks until thread has completed its execution. | |
void | kill () |
Terminates the thread. | |
static void | set_thread_name (const char *name) |
Sets the name (displayed in debuggers) of the calling thread. |
Thread class.
CL_Thread::CL_Thread | ( | ) |
Constructs a thread object.
CL_Thread::~CL_Thread | ( | ) |
void CL_Thread::join | ( | ) |
Blocks until thread has completed its execution.
void CL_Thread::kill | ( | ) |
Terminates the thread.
Warning: This is a dangerous function that should only be used in the most extreme cases. If the target thread owns a critical section, the critical section will not be released. If the target thread is allocating memory from the heap, the heap lock will not be released. Windows XP/2000: The target thread's initial stack is not freed, causing a resource leak.
static void CL_Thread::set_thread_name | ( | const char * | name | ) | [static] |
Sets the name (displayed in debuggers) of the calling thread.
Currently this only works with the Visual Studio compiler and debugger.
void CL_Thread::start | ( | C * | instance, | |
void(C::*)(P1 p1, P2 p2) | member, | |||
P1 | p1, | |||
P2 | p2 | |||
) | [inline] |
void CL_Thread::start | ( | C * | instance, | |
void(C::*)(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) | member, | |||
P1 | p1, | |||
P2 | p2, | |||
P3 | p3, | |||
P4 | p4, | |||
P5 | p5 | |||
) | [inline] |
void CL_Thread::start | ( | C * | instance, | |
void(C::*)(P1 p1, P2 p2, P3 p3, P4 p4) | member, | |||
P1 | p1, | |||
P2 | p2, | |||
P3 | p3, | |||
P4 | p4 | |||
) | [inline] |
void CL_Thread::start | ( | C * | instance, | |
void(C::*)(P1 p1, P2 p2, P3 p3) | member, | |||
P1 | p1, | |||
P2 | p2, | |||
P3 | p3 | |||
) | [inline] |
void CL_Thread::start | ( | CL_Runnable * | runnable | ) |
Starts a thread.
void CL_Thread::start | ( | C * | instance, | |
void(C::*)(P1 p1) | member, | |||
P1 | p1 | |||
) | [inline] |
void CL_Thread::start | ( | C * | instance, | |
void(C::*)() | member | |||
) | [inline] |