_avive-Handling

svn path=/trunk/; revision=6209
This commit is contained in:
Martin Fuchs
2003-10-02 00:51:35 +00:00
parent 6ab07bccfd
commit bf5a98bcc0
3 changed files with 11 additions and 3 deletions
@@ -8,6 +8,7 @@
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
#include <winuser.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -36,7 +36,11 @@ DWORD WINAPI Thread::ThreadProc(void* para)
{
Thread* pThis = (Thread*) para;
return pThis->Run();
int ret = pThis->Run();
pThis->_alive = false;
return ret;
}
@@ -169,7 +169,7 @@ protected:
struct Thread
{
Thread()
: _alive(true)
: _alive(false)
{
_hThread = INVALID_HANDLE_VALUE;
}
@@ -183,7 +183,10 @@ struct Thread
void Start()
{
_hThread = CreateThread(NULL, 0, ThreadProc, this, 0, NULL);
if (!_alive) {
_alive = true;
_hThread = CreateThread(NULL, 0, ThreadProc, this, 0, NULL);
}
}
void Stop()