deprecate Create() function in favour of CreateThread(); its name is too generic for a mix-in class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -659,12 +659,18 @@ public:
|
|||||||
// destructor deletes m_thread
|
// destructor deletes m_thread
|
||||||
virtual ~wxThreadHelper() { KillThread(); }
|
virtual ~wxThreadHelper() { KillThread(); }
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
wxDEPRECATED( wxThreadError Create(unsigned int stackSize = 0) );
|
||||||
|
#endif
|
||||||
|
|
||||||
// create a new thread (and optionally set the stack size on platforms that
|
// create a new thread (and optionally set the stack size on platforms that
|
||||||
// support/need that), call Run() to start it
|
// support/need that), call Run() to start it
|
||||||
wxThreadError Create(unsigned int stackSize = 0)
|
wxThreadError CreateThread(wxThreadKind kind = wxTHREAD_JOINABLE,
|
||||||
|
unsigned int stackSize = 0)
|
||||||
{
|
{
|
||||||
KillThread();
|
KillThread();
|
||||||
|
|
||||||
|
m_kind = kind;
|
||||||
m_thread = new wxThreadHelperThread(*this, m_kind);
|
m_thread = new wxThreadHelperThread(*this, m_kind);
|
||||||
|
|
||||||
return m_thread->Create(stackSize);
|
return m_thread->Create(stackSize);
|
||||||
@@ -692,6 +698,11 @@ protected:
|
|||||||
friend class wxThreadHelperThread;
|
friend class wxThreadHelperThread;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
inline wxThreadError wxThreadHelper::Create(unsigned int stackSize)
|
||||||
|
{ return CreateThread(m_kind, stackSize); }
|
||||||
|
#endif
|
||||||
|
|
||||||
// call Entry() in owner, put it down here to avoid circular declarations
|
// call Entry() in owner, put it down here to avoid circular declarations
|
||||||
inline void *wxThreadHelperThread::Entry()
|
inline void *wxThreadHelperThread::Entry()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user