5 #if !defined(_KKTHREAD_) 14 #if !defined(_KKTHREADMANAGER_) 89 void Crashed (
bool _crashed) {crashed = _crashed;}
145 void AddMsg (KKStrPtr msg);
155 static KKStr threadStatusDescs[];
157 void SetThreadName ();
168 MsgQueuePtr msgQueue;
172 volatile bool shutdownFlag;
185 volatile bool terminateFlag;
199 unsigned long* windowsThreadHandle;
200 DWORD windowsThreadId;
const KKStr & StatusStr() const
void Start(ThreadPriority _priority, bool &successful)
bool ThreadStillProcessing() const
KKThreadList(const KKThreadList &list)
ThreadStatus Status() const
VolConstBool & TerminateFlag() const
KKThread(const KKStr &_threadName, KKThreadManagerPtr _threadManager, MsgQueuePtr _msgQueue)
const KKStr & ThreadName() const
bool ThereIsACircularReferenceShutdown(KKThreadPtr _thread) const
void AddStartPrerequistite(KKThreadPtr _thread)
Specify threads that must start before this thread is started.
unsigned __int32 kkuint32
kkint32 MemoryConsumedEstimated() const
virtual void TerminateFlagChanged()
Will be called whenever the value of 'terminateFlag' is changed; derived classes should override this...
KKThreadList * KKThreadListPtr
VolConstBool & CancelFlag() const
KKThreadManager * KKThreadManagerPtr
void ExceptionText(const KKStr &_exceptionText)
The base class to be used any thread.
bool OkToShutdown() const
bool ShutdownOrTerminateRequested()
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
void AddShutdownPrerequistite(KKThreadPtr _thread)
Specify threads that must stop before this thread is started.
const KKStr & ExceptionText() const
bool ThereIsACircularReferenceStart(KKThreadPtr _thread) const
void Status(ThreadStatus _status)
kkint32 MemoryConsumedEstimated()
void WaitForThreadToStop(kkuint32 maxTimeToWait)
Called by separate thread; will stay in loop until the thread controlled by this instance shutdown or...
KKB::MsgQueuePtr MsgQueue()
KKThreadList(bool _owner=true)
VolConstBool & ShutdownFlag() const
void Kill()
stops the running thread and frees the thread handle
KKStr & operator=(const KKStr &src)
void AddMsg(KKStrPtr msg)
unsigned int ThreadStartCallBack(void *param)
static const KKStr & ThreadStatusToStr(ThreadStatus)
void Crashed(bool _crashed)
void AddMsg(const KKStr &msg)
volatile const bool VolConstBool