csThread Class ReferenceRepresentation of a thread of executation. More...
Inheritance diagram for csThread:
Public Member Functions
|virtual char const *||GetLastError () const =0|
|Return the last error description, else 0 if there was none. |
|virtual csThreadPriority||GetPriority ()=0|
|Retrieve the current execution priority of this thread. |
|virtual bool||SetPriority (csThreadPriority Priority)=0|
|Set the current execution priority of this thread. |
|virtual bool||Start ()=0|
|Start the thread. |
|virtual bool||Stop ()=0|
|Unmercifully stop the thread as soon as possible. |
|virtual bool||Wait ()=0|
|Wait for the thread to die. |
|virtual void||Yield ()=0|
|Yield Thread frees CPU time if nothing to do. |
Static Public Member Functions
|static csRef< csThread >||Create (csRunnable *, uint32 options=0)|
|Create a new thread. |
Detailed DescriptionRepresentation of a thread of executation.
Member Function Documentation
Create a new thread.
Returns the new thread object. The thread begins running when the Start() method is invoked.
|virtual char const* csThread::GetLastError||(||)|| const
Return the last error description, else 0 if there was none.
|virtual csThreadPriority csThread::GetPriority||(||)||
Retrieve the current execution priority of this thread.
- A member of the csThreadPriority enumeration
|virtual bool csThread::SetPriority||(||csThreadPriority||Priority||)||
Set the current execution priority of this thread.
The specifics of when this takes effect and what underlying platform priority each value maps to are properties of the specific platform-based implementation.
|virtual bool csThread::Start||(||)||
Start the thread.
If something goes awry false is returned.
|virtual bool csThread::Stop||(||)||
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||(||)||
Wait for the thread to die.
Only returns once the thread has terminated.
|virtual void csThread::Yield||(||)||
Yield Thread frees CPU time if nothing to do.
NOTE: This Yields execution time in the thread in which this function is called. For example, OtherThread->Yeild() will NOT have the results that would be expected.
The documentation for this class was generated from the following file:
Generated for Crystal Space 1.0.2 by doxygen 1.4.7