Control | |
SInt32 | GetPriority () |
SInt32 | SetPriority (SInt32 newVal) |
void | Suspend () |
void | Finish () |
void | Resume () |
bool | IsSuspend () |
bool | HasCompleted () |
void | Kill () |
static void | YieldThread (CP_M_Thread *inThread=NULL) |
static void | SleepThread (UInt32 numMilliSecs) |
Public Types | |
enum | { kPriorityIdle = THREAD_PRIORITY_IDLE, kPriorityLowest = THREAD_PRIORITY_LOWEST, kPriorityBelowNormal = THREAD_PRIORITY_BELOW_NORMAL, kPriorityNormal = THREAD_PRIORITY_NORMAL, kPriorityHighest = THREAD_PRIORITY_HIGHEST, kPriorityCritical = THREAD_PRIORITY_TIME_CRITICAL, kPriorityError, kPriorityLowest = THREAD_PRIORITY_LOWEST, kPriorityBelowNormal = THREAD_PRIORITY_BELOW_NORMAL, kPriorityNormal = THREAD_PRIORITY_NORMAL, kPriorityHighest = THREAD_PRIORITY_HIGHEST, kPriorityCritical = THREAD_PRIORITY_TIME_CRITICAL, kPriorityError } |
Public Member Functions | |
Constructor / Destructor | |
CP_M_Thread () | |
Constructor. | |
virtual | ~CP_M_Thread () |
Destructor. | |
Setup | |
void | SetupThread () |
Protected Member Functions | |
Running | |
virtual UInt32 | Run ()=0 |
Getters | |
ThreadID | GetID () |
DWORD | GetID () |
Protected Attributes | |
ThreadID | fThreadID |
HANDLE | fThreadHandle |
unsigned | fThreadID |
bool | fThreadSuspend |
Static Private Member Functions | |
Running | |
static pascal void * | ThreadEntry (void *inParameter) |
static unsigned WINAPI | ThreadEntry (LPVOID inParameter) |
Private Attributes | |
bool | fHasCompleted |
bool * | fDestructed |
|
|
|
Constructor. |
|
Destructor. |
|
Allow other threads time to operate.
|
|
Put this thread to sleep for the passed in number of milliseconds.
|
|
Get the priority of this thread.
|
|
Set the priority of this thread, and returns the priority
|
|
Suspend the thread.
|
|
Mark that we are done, so thread loops will finish.
|
|
Resume a previously suspended thread.
|
|
Return true if our thread is currently suspended.
|
|
Return the status of the has completed flag to indicate if this thread has completed.
|
|
Delete our thread.
|
|
Setsup the thread with the underlying OS.
|
|
Subclasses must override this to provide the routine that does the work in the tread.
|
|
Return the thread id, MacOS version.
|
|
Return the thread id, Windows version.
|
|
|
|
|
|
|
|
|
|
|
|
A MacOS ThreadID for this thread. |
|
Windows thread HANDLE for this thread. |
|
Thread id for the thread. |