Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXThread.h>
Public Member Functions | |
FXThread () | |
FXThreadID | id () const |
FXbool | running () const |
FXbool | start (unsigned long stacksize=0) |
FXbool | join () |
FXbool | join (FXint &code) |
FXbool | cancel () |
FXbool | detach () |
void | priority (FXint prio) |
FXint | priority () |
virtual | ~FXThread () |
Static Public Member Functions | |
void | exit (FXint code=0) |
void | yield () |
void | sleep (unsigned long sec, unsigned long nsec=0) |
FXThread * | self () |
FXThreadID | current () |
Subclasses must implement the run() function do implement the desired functionality of the thread. The storage of the FXThread object is to be managed by the calling thread, not by the thread itself.
|
Initialize thread object.
|
|
Destroy the thread immediately, running or not. It is probably better to wait until it is finished, in case the thread currently holds mutexes. |
|
Return handle of this thread object. This handle is valid in the context of the thread which called start(). |
|
Return TRUE if this thread is running.
|
|
Start thread; the thread is started as attached. The thread is given stacksize for its stack; a value of zero for stacksize will give it the default stack size. |
|
Suspend calling thread until thread is done.
|
|
Suspend calling thread until thread is done, and set code to the return value of run() or the argument passed into exit(). If an exception happened in the thread, return -1. |
|
Cancel the thread, stopping it immediately, running or not. If the calling thread is this thread, nothing happens. It is probably better to wait until it is finished, in case the thread currently holds mutexes. |
|
Detach thread, so that a no join() is necessary to harvest the resources of this thread.
|
|
Exit the calling thread. No destructors are invoked for objects on thread's stack; to invoke destructors, throw an exception instead. |
|
Make the thread yield its time quantum.
|
|
Make the calling thread sleep for a number of seconds and nanoseconds.
|
|
Return pointer to the FXThread instance associated with the calling thread; it returns NULL for the main thread and all threads not created by FOX.
|
|
Return thread id of calling thread.
|
|
Set thread priority.
|
|
Return thread priority.
|
Copyright © 1997-2005 Jeroen van der Zijp |