ClanLib
2.3.7
|
Thread class. More...
#include <thread.h>
Public Member Functions | |
Construction | |
CL_Thread () | |
Constructs a thread object. More... | |
~CL_Thread () | |
Operations | |
void | start (CL_Runnable *runnable) |
Starts a thread. More... | |
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. More... | |
void | kill () |
Terminates the thread. More... | |
static void | set_thread_name (const char *name) |
Sets the name (displayed in debuggers) of the calling thread. More... | |
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 |
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 | ( | CL_Runnable * | runnable) |
Starts a thread.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |