ClanLib  2.3.7
List of all members
CL_Thread Class Reference

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...
 

Detailed Description

Thread class.

Constructor & Destructor Documentation

CL_Thread::CL_Thread ( )

Constructs a thread object.

CL_Thread::~CL_Thread ( )

Member Function Documentation

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 ( CL_Runnable runnable)

Starts a thread.

template<class C >
void CL_Thread::start ( C *  instance,
void(C::*)()  member 
)
inline
template<class C , class P1 >
void CL_Thread::start ( C *  instance,
void(C::*)(P1 p1)  member,
P1  p1 
)
inline
template<class C , class P1 , class P2 >
void CL_Thread::start ( C *  instance,
void(C::*)(P1 p1, P2 p2)  member,
P1  p1,
P2  p2 
)
inline
template<class C , class P1 , class P2 , class P3 >
void CL_Thread::start ( C *  instance,
void(C::*)(P1 p1, P2 p2, P3 p3)  member,
P1  p1,
P2  p2,
P3  p3 
)
inline
template<class C , class P1 , class P2 , class P3 , class P4 >
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
template<class C , class P1 , class P2 , class P3 , class P4 , class P5 >
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

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