mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
_avive-Handling
svn path=/trunk/; revision=6209
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user