#include <ThreadClass.h>


Public Member Functions | |
| ThreadClass () | |
| virtual | ~ThreadClass () |
| void | Sleep (int milliseconds) |
Protected Member Functions | |
| void | DoQuitNow (const int returnCode) |
| virtual int | ThreadEntry (void)=0 |
| virtual void | ThreadExiting (const int returnCode) |
| void | CheckQuit (void) |
Friends | |
| class | Thread |
| ThreadClass | ( | ) |
The ctor performs some basic initialisation
| virtual ~ThreadClass | ( | ) | [virtual] |
The dtor makes sure everything is tidy
| void Sleep | ( | int | milliseconds | ) |
Sleeps the thread for the class by the number of milliseconds supplied. This uses the CurrentThreadSleep() function. Internally this is a point where the thread can be cancelled. There must not be any mutex object with a current lock when Sleep() is called otherwise a deadlock situation may develop. Memory should not be allocated on the heap at this point unless it can be freed by ThreadExiting() or the class dtor.
| milliseconds | the sleep time in milliseconds |
| void DoQuitNow | ( | const int | returnCode | ) | [protected] |
This exits the thread and can only be used in the context of the thread.
| returnCode | The return code. |
| virtual int ThreadEntry | ( | void | ) | [protected, pure virtual] |
The thread starts executing from here.
Implemented in BaseServer, and BaseTransportServer.
| virtual void ThreadExiting | ( | const int | returnCode | ) | [protected, virtual] |
This is called just before the thread exits, from the context of the thread.
| void CheckQuit | ( | void | ) | [protected] |
If Thread::Terminate() has been called then using this function will exit the thread.
1.5.3