1
0

Added doxyComments for cIsThread.

This commit is contained in:
madmaxoft 2013-08-11 18:46:49 +02:00
parent cc708f757c
commit b58ca60815
2 changed files with 13 additions and 7 deletions

View File

@ -54,9 +54,9 @@ cIsThread::cIsThread(const AString & iThreadName) :
m_ThreadName(iThreadName),
m_ShouldTerminate(false),
#ifdef _WIN32
m_Handle(NULL)
m_Handle(NULL)
#else // _WIN32
m_HasStarted(false)
m_HasStarted(false)
#endif // else _WIN32
{
}

View File

@ -26,18 +26,24 @@ In the descending class' constructor call the Start() method to start the thread
class cIsThread
{
protected:
virtual void Execute(void) = 0; // This function is called in the new thread's context
/// This is the main thread entrypoint
virtual void Execute(void) = 0;
volatile bool m_ShouldTerminate; // The overriden Execute() method should check this periodically and terminate if this is true
/// The overriden Execute() method should check this value periodically and terminate if this is true
volatile bool m_ShouldTerminate;
public:
cIsThread(const AString & iThreadName);
~cIsThread();
bool Start(void); // Starts the thread
bool Wait(void); // Waits for the thread to finish
/// Starts the thread; returns without waiting for the actual start
bool Start(void);
static unsigned long GetCurrentID(void); // Returns the OS-dependent thread ID for the caller's thread
/// Waits for the thread to finish. Doesn't signalize the ShouldTerminate flag
bool Wait(void);
/// Returns the OS-dependent thread ID for the caller's thread
static unsigned long GetCurrentID(void);
private:
AString m_ThreadName;