EpcTools
An event based multi-threaded C++ development framework.
|
Go to the documentation of this file.
97 Void
init(pVoid arg,
size_t stackSize = 0);
114 static Void
sleep(Int milliseconds);
183 Void
signal(Int sig) { pthread_kill(m_thread, sig); }
194 static pVoid _threadProc(pVoid arg);
207 #endif // #ifndef __ETBASIC_H
Defines base class for exceptions and declaration helper macros.
virtual Dword threadProc(pVoid arg)=0
Function that will be called in a separate thread.
the thread is waiting to run
Definition: etbasic.h:63
RunState getRunState()
Returns the current thread run state.
Definition: etbasic.h:140
the threadProc has exited and the thread is no longer running
Definition: etbasic.h:67
static Void sleep(Int milliseconds)
Sleeps for the specified number of milliseconds.
Definition: etbasic.cpp:149
Void join()
Waits for the thread to terminate.
Definition: etbasic.cpp:138
Macros for various standard C library functions and standard includes.
the thread is running
Definition: etbasic.h:65
A private mutex (the mutex data is allocated from either the heap or stack).
Definition: esynch.h:175
Bool isDoneRunning()
Determines if the thread has finished running.
Definition: etbasic.h:168
Contains definitions for synchronization objects.
Bool isRunning()
Determines if the thread is running.
Definition: etbasic.h:159
EThreadBasic()
Class constructor.
Definition: etbasic.cpp:57
Int cancelWait()
Sends a cancellation request to the thread.
Definition: etbasic.cpp:191
Bool isInitialized()
Returns the thread initialization state.
Definition: etbasic.cpp:133
static Void UnInitialize()
performs internal de-initialization *** DO NOT CALL ***
Definition: etbasic.cpp:52
static Void Initialize()
performs internal initialization *** DO NOT CALL ***
Definition: etbasic.cpp:47
friend class EThreadBase
Definition: etbasic.h:55
Void init(pVoid arg, size_t stackSize=0)
Initialize and start the thread.
Definition: etbasic.cpp:106
static Void yield()
Relinquishes the CPU.
Definition: etbasic.cpp:158
Void signal(Int sig)
Definition: etbasic.h:183
An abstract class that represents contains the threadProc() that will be run in a separate thread.
Definition: etbasic.h:53
virtual ~EThreadBasic()
Class destructor.
Definition: etbasic.cpp:68
RunState
EThreadBasic run states.
Definition: etbasic.h:60
The base class for exceptions derived from std::exception.
Definition: eerror.h:92
Bool isWaitingToRun()
Determines if the thread is waiting to run.
Definition: etbasic.h:150
list< EThreadBasic * > EThreadPtrList
Definition: etbasic.h:40
EThreadError_UnableToInitialize()