|
|
A thread is a separate execution context that exists in the same address space. Threads make better use of multiple processor machines and allow blocking one execution thread while allowing other to run.
| void cleanup ()
| cleanup |
[virtual]
This method is called when the current thread terminates.
| bool startup ()
| startup |
Actually starts running the new thread which lingers after creation
Returns: True if an error occured, false if started ok
| bool error ()
| error |
[const]
Check if the thread creation failed
Returns: True if an error occured, false if created ok
| bool running ()
| running |
[const]
Check if the thread is running or not
Returns: True if running, false if it has terminated or no startup called
| void yield ()
| yield |
[static]
Give up the currently running timeslice
| Thread * current ()
| current |
[static]
Get a pointer to the currently running thread
Returns: A pointer to the current thread or NULL for main thread
| int count ()
| count |
[static]
Get the number of threads
Returns: Count of threads except the main one
| void exit ()
| exit |
[static]
Terminates the current thread.
| void cancel ()
| cancel |
Terminates the specified thread.
| void killall ()
| killall |
[static]
Kills all other running threads. Ouch! Must be called from the main thread or it does nothing.
| void preExec ()
| preExec |
[static]
On some platforms this method kills all other running threads. Must be called after fork() but before any exec*() call.
| Thread (const char *name = 0)
| Thread |
[protected]
Creates and starts a new thread
Parameters:
| name | Static name of the thread (for debugging purpose only) |
| ~Thread ()
| ~Thread |
[protected virtual]
The destructor is called when the thread terminates
| Generated by: kk on nyx on Sat Jun 4 19:29:41 2005, using kdoc 2.0a54. |