MercuryThread Class Reference

Thread object. More...

#include <MercuryThreads.h>

Collaboration diagram for MercuryThread:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MercuryThread ()
 MercuryThread (const MString &name)
 ~MercuryThread ()
int Create (void *(*fn)(void *), void *data)
 Create a thread of function fn and pass it data *data.
int Wait (long lMilliseconds=10000000)
 Wait for the thread to complete.
int Halt (bool kill=true)
 Terminate the thread early. It's advised you only use this for terminating the thread.
int Resume ()
 Resume a halted thread. This does NOT WORK IN LINUX. It is recommended you do not use this.
void Close ()
 Close and clean up a thread. This is not necessiary. It will be done on deletion as well.

Private Attributes

MString m_name
pthread_t m_thread

Detailed Description

Thread object.

Definition at line 15 of file MercuryThreads.h.


Constructor & Destructor Documentation

MercuryThread::MercuryThread (  ) 

Definition at line 8 of file MercuryThreads.cpp.

MercuryThread::MercuryThread ( const MString name  ) 

Definition at line 13 of file MercuryThreads.cpp.

MercuryThread::~MercuryThread (  ) 

Definition at line 18 of file MercuryThreads.cpp.


Member Function Documentation

int MercuryThread::Create ( void *(*)(void *)  fn,
void *  data 
)

Create a thread of function fn and pass it data *data.

Definition at line 39 of file MercuryThreads.cpp.

int MercuryThread::Wait ( long  lMilliseconds = 10000000  ) 

Wait for the thread to complete.

Definition at line 79 of file MercuryThreads.cpp.

int MercuryThread::Halt ( bool  kill = true  ) 

Terminate the thread early. It's advised you only use this for terminating the thread.

Definition at line 57 of file MercuryThreads.cpp.

int MercuryThread::Resume (  ) 

Resume a halted thread. This does NOT WORK IN LINUX. It is recommended you do not use this.

Definition at line 70 of file MercuryThreads.cpp.

void MercuryThread::Close (  ) 

Close and clean up a thread. This is not necessiary. It will be done on deletion as well.

Definition at line 89 of file MercuryThreads.cpp.


Member Data Documentation

MString MercuryThread::m_name [private]

Definition at line 37 of file MercuryThreads.h.

pthread_t MercuryThread::m_thread [private]

Definition at line 45 of file MercuryThreads.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo