#include <vuThread.h>
Inheritance diagram for vuThread:
Public Member Functions | |
virtual | ~vuThread () |
Virtual destructor (doing nothing). | |
bool | startThread (int whatsup, void *data=NULL) |
This function is called by the user to start a new thread. | |
virtual void | run (int whatsup, void *data)=0 |
This function is called when a new thread is started by startThread. | |
void | stopThread () |
Private Attributes | |
vuMutex | m_WhatsupMutex |
This is needed to avoid confusion in whatsup argument handling. | |
int | m_Whatsup |
holds the argument passed to the thread started | |
void * | m_AdditionalData |
holds the additional data passed to the thread started | |
Friends | |
void * | _kickoff (void *ptr) |
NB - These threads are created as detached threads so that they will deallocate properely as the vuThread class is currently used.
Definition at line 99 of file vuThread.h.
|
Virtual destructor (doing nothing).
Definition at line 103 of file vuThread.h. |
|
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 vu1512112, vu1112117, vu1112113, ns_vu1112112::vu1112112, vuKeyFramerDialog, and vuKFThread. Referenced by _kickoff(). |
|
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 44 of file vuThread.cpp. References _kickoff, vuMutex::lock(), m_AdditionalData, m_Whatsup, m_WhatsupMutex, and NULL. Referenced by vu1112117::computeSlicesUsingThreads(), vu1112117::refineSlicesUsingThreads(), ns_vu1112112::vu1112112::render(), vu1512112::render(), and vu1112113::render(). |
Here is the call graph for this function:
|
Definition at line 106 of file vuThread.cpp. References NULL. Referenced by _kickoff(). |
|
Definition at line 19 of file vuThread.cpp. Referenced by startThread(). |
|
holds the additional data passed to the thread started
Definition at line 140 of file vuThread.h. Referenced by _kickoff(), and startThread(). |
|
holds the argument passed to the thread started
Definition at line 138 of file vuThread.h. Referenced by _kickoff(), and startThread(). |
|
This is needed to avoid confusion in whatsup argument handling. This solution is not elegant, but if we want to hand over an argument to run() we need it. Maybe someone has a better idea... Definition at line 135 of file vuThread.h. Referenced by _kickoff(), and startThread(). |