GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
Thread Class Reference

#include <Thread.H>

Inheritance diagram for Thread:
Inheritance graph
[legend]
Collaboration diagram for Thread:
Collaboration graph
[legend]

Public Member Functions

 Thread (void)
 
virtual ~Thread (void)
 
int run (void *(*start_routine)(void *), void *data)
 
void * meetThread (void)
 
void exit (void *retVal)
 

Private Attributes

pthread_t thread
 The thread structure. More...
 

Detailed Description

Class to spawn a thread and meet an exited thread.

Definition at line 33 of file Thread.H.

Constructor & Destructor Documentation

Thread::Thread ( void  )
inline

Constructor

Definition at line 44 of file Thread.H.

virtual Thread::~Thread ( void  )
inlinevirtual

Destructor

Definition at line 53 of file Thread.H.

Member Function Documentation

void Thread::exit ( void *  retVal)
inline
Called to exit the thread passes retVal to the one who calls meetThread
Parameters
retValThe pointer to pass to the meetThread caller

Definition at line 123 of file Thread.H.

Here is the caller graph for this function:

void* Thread::meetThread ( void  )
inline
Wait for the thread to end
Returns
If using USE_GLIB_THREADS then NULL, if using pthreads, then the argument passed to Thread::exit when called by the exiting thread.

Definition at line 104 of file Thread.H.

Here is the caller graph for this function:

int Thread::run ( void *(*)(void *)  start_routine,
void *  data 
)
inline
Start a thread running start_routine, passing data to that function
Parameters
start_routineThe function to run after the thread has been started
dataThe argument to be pased to the thread
zeroon success, a different number on failure

Definition at line 79 of file Thread.H.

Here is the caller graph for this function:

Member Data Documentation

pthread_t Thread::thread
private

The thread structure.

Definition at line 39 of file Thread.H.


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