Beginning the thread with _beginthreadex but ending with ExitThread is not a good thing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/wx.h"
|
# include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
@@ -36,12 +36,18 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#include "wx/thread.h"
|
#include "wx/thread.h"
|
||||||
|
|
||||||
|
#ifdef Yield
|
||||||
|
# undef Yield
|
||||||
|
#endif
|
||||||
|
|
||||||
// must have this symbol defined to get _beginthread/_endthread declarations
|
// must have this symbol defined to get _beginthread/_endthread declarations
|
||||||
#ifndef _MT
|
#ifndef _MT
|
||||||
#define _MT
|
#define _MT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
|
#if defined(__VISUALC__) || \
|
||||||
|
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
|
||||||
|
(defined(__GNUG__) && defined(__MSVCRT__))
|
||||||
|
|
||||||
#if defined(__BORLANDC__) && !defined(__MT__)
|
#if defined(__BORLANDC__) && !defined(__MT__)
|
||||||
// I can't set -tWM in the IDE (anyone?) so have to do this
|
// I can't set -tWM in the IDE (anyone?) so have to do this
|
||||||
@@ -53,7 +59,6 @@
|
|||||||
#define __MFC_COMPAT__
|
#define __MFC_COMPAT__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -926,7 +931,9 @@ void wxThread::Exit(ExitCode status)
|
|||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
|
#if defined(__VISUALC__) || \
|
||||||
|
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
|
||||||
|
(defined(__GNUG__) && defined(__MSVCRT__))
|
||||||
_endthreadex((unsigned)status);
|
_endthreadex((unsigned)status);
|
||||||
#else // !VC++
|
#else // !VC++
|
||||||
::ExitThread((DWORD)status);
|
::ExitThread((DWORD)status);
|
||||||
|
Reference in New Issue
Block a user