Structural deformable models
|
#include <vuThread.h>
Public Member Functions | |
virtual | ~vuThread () |
Virtual destructor (doing nothing) More... | |
bool | startThread (int whatsup, void *data=NULL) |
virtual void | run (int whatsup, void *data)=0 |
void | stopThread () |
Static Public Member Functions | |
static void | usleep (unsigned long ms) |
sleep for n microseconds (!!not yet implemented for win32) More... | |
Friends | |
void * | _kickoff (void *ptr) |
class providing basic multithreading functions
NB - These threads are created as detached threads so that they will deallocate properely as the vuThread class is currently used.
Definition at line 79 of file vuThread.h.
|
inlinevirtual |
Virtual destructor (doing nothing)
Definition at line 83 of file vuThread.h.
References _kickoff(), and NULL.
|
pure virtual |
This function is called when a new thread is started by startThread. The function is virtual. Override it to run your own code. The whatsup argument is for free use to customize behaviour of different threads.
Implemented in Brain.
Referenced by _kickoff(), and vuMutex::unlock().
bool vuThread::startThread | ( | int | whatsup, |
void * | data = NULL |
||
) |
This function is called by the user to start a new thread. It calls the virtual run() with parameter whatsup to allow different behaviour of the threads.
Definition at line 45 of file vuThread.cpp.
References _kickoff(), and NULL.
Referenced by Brain::Brain(), Brain::doCommand(), and vuMutex::unlock().
void vuThread::stopThread | ( | ) |
Definition at line 107 of file vuThread.cpp.
References NULL.
Referenced by _kickoff(), and vuMutex::unlock().
|
static |
sleep for n microseconds (!!not yet implemented for win32)
Definition at line 112 of file vuThread.cpp.
Referenced by Brain::run(), and vuMutex::unlock().
|
friend |
Definition at line 20 of file vuThread.cpp.