diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-08-14 11:24:57 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-08-14 11:24:57 +0200 |
commit | af54ce4842850f228d2ac85cb47e6339fd36e9c1 (patch) | |
tree | 5bcf8cb26d825d4e8f4d84b504cd502cfb2bd6e9 /thread.h | |
parent | 8fe90254f6843fedab11f4bbf7f83090e341f6eb (diff) | |
download | vdr-af54ce4842850f228d2ac85cb47e6339fd36e9c1.tar.gz vdr-af54ce4842850f228d2ac85cb47e6339fd36e9c1.tar.bz2 |
Changed cThread Active() vs. Running()
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.h 1.29 2005/08/13 13:01:33 kls Exp $ + * $Id: thread.h 1.30 2005/08/14 11:21:48 kls Exp $ */ #ifndef __THREAD_H @@ -75,8 +75,8 @@ public: class cThread { friend class cThreadLock; private: - bool running; bool active; + bool running; pthread_t childTid; cMutex mutex; char *description; @@ -89,13 +89,13 @@ protected: virtual void Action(void) = 0; ///< A derived cThread class must implement the code it wants to ///< execute as a separate thread in this function. If this is - ///< a loop, it must check Active() repeatedly to see whether + ///< a loop, it must check Running() repeatedly to see whether ///< it's time to stop. - bool Active(void) { return active; } + bool Running(void) { return running; } ///< Returns false if a derived cThread object shall leave its Action() ///< function. void Cancel(int WaitSeconds = 0); - ///< Cancels the thread by first setting 'active' to false, so that + ///< Cancels the thread by first setting 'running' to false, so that ///< the Action() loop can finish in an orderly fashion and then waiting ///< up to WaitSeconds seconds for the thread to actually end. If the ///< thread doesn't end by itself, it is killed. @@ -109,8 +109,8 @@ public: void SetDescription(const char *Description, ...); bool Start(void); ///< Actually starts the thread. - bool Running(void); - ///< Checks whether the thread is actually running. + bool Active(void); + ///< Checks whether the thread is still alive. static bool EmergencyExit(bool Request = false); }; |