Simple thread class.
More...
#include <Thread.h>
|
| virtual void * | run ()=0 |
| | The method that is actually executed on the thread, override this. More...
|
| |
| bool | shouldContinue () const |
| | Receive a hint about what you should do, continue or not? Depends mostly on the internal stop value set by Stop. More...
|
| |
| event_base * | GetEventBase () const |
| |
| evdns_base * | GetDNSBase () const |
| |
| trippingcyril::thread::Thread::Thread |
( |
const String & |
pName, |
|
|
const Module * |
pModule |
|
) |
| |
Standard constructor
- Parameters
-
| pModule | The module to register this thread on |
| pName | The name the thread will get |
| virtual trippingcyril::thread::Thread::~Thread |
( |
| ) |
|
|
virtual |
| bool trippingcyril::thread::Thread::Detach |
( |
| ) |
|
Does a detach operation on the thread.
- Returns
- True if succesfull
| const String trippingcyril::thread::Thread::GetName |
( |
| ) |
const |
|
inline |
Receive the name of the thread.
| void* trippingcyril::thread::Thread::getReturnedValue |
( |
| ) |
const |
|
inline |
Receive the value returned from the thread after a Join operation.
| bool trippingcyril::thread::Thread::isRunning |
( |
| ) |
const |
|
inline |
See if the thread is running or not.
- Returns
- True if the thread is running
| bool trippingcyril::thread::Thread::Join |
( |
| ) |
|
Does a join operation on the thread.
- Returns
- True if succesfull
| virtual void* trippingcyril::thread::Thread::run |
( |
| ) |
|
|
protectedpure virtual |
| pthread_t trippingcyril::thread::Thread::Self |
( |
| ) |
const |
|
inline |
Get the internal thread id.
- Returns
- The pthread id of the running thread, 0 if not yet running
| bool trippingcyril::thread::Thread::shouldContinue |
( |
| ) |
const |
|
protected |
Receive a hint about what you should do, continue or not? Depends mostly on the internal stop value set by Stop.
- Returns
- True if you should not stop
| bool trippingcyril::thread::Thread::Start |
( |
| ) |
|
Starts the thread.
- Returns
- True if thread succesfully started
| void trippingcyril::thread::Thread::Stop |
( |
| ) |
|
The documentation for this class was generated from the following file: