| 1 |
/*******************************************************/ |
/*******************************************************/ |
| 2 |
/* */ |
/* */ |
| 3 |
/* LeafOK Innd */ |
/* LeafOK Innbbsd */ |
| 4 |
/* Copyright (C) LeafOK.com, 2003-2004 */ |
/* Copyright (C) LeafOK.com, 2003-2004 */ |
| 5 |
/* */ |
/* */ |
| 6 |
/* Programmed by Leaf */ |
/* Programmed by Leaf */ |
| 7 |
/* E-mail:leaf@leafok.com QQ:6049044 */ |
/* E-mail:leaflet@leafok.com QQ:6049044 */ |
| 8 |
/* */ |
/* */ |
| 9 |
/* http://bbs.leafok.com */ |
/* http://bbs.leafok.com */ |
| 10 |
/* http://bbs.leafok.net */ |
/* http://bbs.leafok.net */ |
| 28 |
int end(void); |
int end(void); |
| 29 |
inline bool IsRunning(void) |
inline bool IsRunning(void) |
| 30 |
{ |
{ |
| 31 |
return this->running; |
return (this->running && this->IsThreadActive()); |
| 32 |
} |
} |
| 33 |
inline base* GetParentThread(void) |
inline base* GetParentThread(void) |
| 34 |
{ |
{ |
| 47 |
this->p_ThreadPool = p_ThreadPool; |
this->p_ThreadPool = p_ThreadPool; |
| 48 |
} |
} |
| 49 |
protected: |
protected: |
| 50 |
|
ULONG ulMainThreadId; |
| 51 |
base* p_ParentThread; |
base* p_ParentThread; |
| 52 |
thread_pool* p_ThreadPool; |
thread_pool* p_ThreadPool; |
| 53 |
SOCKET s; |
SOCKET s; |
| 82 |
private: |
private: |
| 83 |
HANDLE hThread; |
HANDLE hThread; |
| 84 |
static DWORD Thread(LPVOID pParam); |
static DWORD Thread(LPVOID pParam); |
| 85 |
|
public: |
| 86 |
|
bool IsThreadActive(void); |
| 87 |
}; |
}; |
| 88 |
|
|