CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csThread Class Reference

A platform-independent thread object. More...

#include <thread.h>

Inheritance diagram for csThread:

csRefCount List of all members.

Public Methods

virtual bool Start ()=0
 Start the thread. More...

virtual bool Stop ()=0
 Unmercifully stop the thread as soon as possible. More...

virtual bool Wait ()=0
 Wait for the thread to die. More...

virtual char const * GetLastError ()=0
 Return the last error description, else NULL if there was none. More...


Static Public Methods

csRef< csThread > Create (csRunnable *, uint32 options=0)
 Create a new thread. More...


Detailed Description

A platform-independent thread object.

Definition at line 77 of file thread.h.


Member Function Documentation

csRef<csThread> csThread::Create csRunnable  ,
uint32    options = 0
[static]
 

Create a new thread.

Returns the new thread object. The thread begins running when the Start() method is invoked.

virtual char const* csThread::GetLastError   [pure virtual]
 

Return the last error description, else NULL if there was none.

virtual bool csThread::Start   [pure virtual]
 

Start the thread.

If something goes awry false is returned.

virtual bool csThread::Stop   [pure virtual]
 

Unmercifully stop the thread as soon as possible.

This method performs a dirty shutdown of the thread. The thread is not given a chance to exit normally. Do not invoke this method unless you have a very good reason for doing so. In general, it is best to implement some sort of communication with threads so that you can ask them to terminate in an orderly fashion. Returns true if the thread was killed.

virtual bool csThread::Wait   [pure virtual]
 

Wait for the thread to die.

Only returns once the thread has terminated.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14