#include <TdkThread.h>
Inheritance diagram for TdkThread:
Public Member Functions | |
TdkThread () | |
TdkThread (std::string name) | |
virtual | ~TdkThread () |
void | start () |
void | interrupt () |
void | join () |
std::string | getName () |
bool | isAlive () |
Static Public Member Functions | |
static void | sleep (unsigned long millis) |
static void | finalizeEnv () |
static void | checkInterruption () throw (TdkInterruptedException) |
static TdkThread * | getCurrentThread () |
Protected Member Functions | |
virtual void | run ()=0 |
Protected Attributes | |
std::string | name_ |
pthread_t | runnable_ |
Static Protected Attributes | |
static int | threadInitNumber_ = 0 |
Private Member Functions | |
void | init (std::string name) |
Static Private Member Functions | |
static void * | startRoutine (void *thisThread) |
Private Attributes | |
bool | interrupted_ |
bool | alive_ |
Static Private Attributes | |
static TdkThreadLocal< TdkThread > | currentThread_ |
TdkThread::TdkThread | ( | ) |
TdkThread::TdkThread | ( | std::string | name | ) |
TdkThread::~TdkThread | ( | ) | [virtual] |
void TdkThread::start | ( | ) |
Starts a new thread to execute the run() method.
Reimplemented in TdkWin32GpsReaderAgent.
void TdkThread::interrupt | ( | ) |
Interrupts this thread execution.
void TdkThread::join | ( | ) |
Make the caller to wait until this thread finishes.
std::string TdkThread::getName | ( | ) |
void TdkThread::sleep | ( | unsigned long | millis | ) | [static] |
void TdkThread::finalizeEnv | ( | ) | [static] |
TODO: O que eh isso? Quando se usa?
void TdkThread::checkInterruption | ( | ) | throw (TdkInterruptedException) [static] |
Adds an explicit interruption point to the code. If no interruption was requested, it returns immediately, otherwise it throws a TdkInterruptedException.
bool TdkThread::isAlive | ( | ) |
TdkThread * TdkThread::getCurrentThread | ( | ) | [static] |
virtual void TdkThread::run | ( | ) | [protected, pure virtual] |
This method should be overrided to do the actual work.
Implemented in TdkEventDispatcher, and TdkWin32GpsReaderAgent.
void * TdkThread::startRoutine | ( | void * | thisThread | ) | [static, private] |
void TdkThread::init | ( | std::string | name | ) | [private] |
int TdkThread::threadInitNumber_ = 0 [static, protected] |
std::string TdkThread::name_ [protected] |
pthread_t TdkThread::runnable_ [protected] |
TdkThreadLocal< TdkThread > TdkThread::currentThread_ [static, private] |
bool TdkThread::interrupted_ [private] |
bool TdkThread::alive_ [private] |