#include <LDK/Threading.h>
Collaboration diagram for LDK::Thread:

Public Member Functions | |
| Thread () | |
| Constructor. Does not start the thread. | |
| virtual | ~Thread () |
| virtual void | run ()=0 |
| bool | isRunning () |
| void | start () |
| void | kill () |
Protected Types | |
| typedef void * | ThreadHandle |
Protected Member Functions | |
| Thread (const Thread &rhs) | |
| May not be copied. | |
| void | operator= (const Thread &rhs) |
| May not be assigned to. | |
Static Protected Member Functions | |
| static void | runThread (void *self) |
Protected Attributes | |
| ThreadHandle | mHandle |
| Mutex | mMutex |
| volatile bool | mRunning |
Definition at line 92 of file Threading.h.
| virtual LDK::Thread::~Thread | ( | ) | [virtual] |
Destructor. Blocks until the thread has finished running, is canceled, or throws an exception.
| virtual void LDK::Thread::run | ( | ) | [pure virtual] |
Override this: it is the 'main' for the thread. May throw exceptions safely (though the thread will be terminated).
| bool LDK::Thread::isRunning | ( | ) | [inline] |
Test if this Thread is running.
Definition at line 126 of file Threading.h.
| void LDK::Thread::start | ( | ) |
Starts this Thread running.
| ThreadError | if the thread is already running. |
| void LDK::Thread::kill | ( | ) |
Kills this thread (not the current thread). Very Nasty (tm). On windows it leaks everything and leaves dlls in ram :( On unix it is unlikely to cause C++ destructors to be called.
1.5.1