From 3d5930b5ea5cd28d97ca9df147cd48bc51061480 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Fri, 28 Nov 2008 17:43:34 +0000 Subject: [PATCH] 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 --- include/wx/thread.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/wx/thread.h b/include/wx/thread.h index f595b3191e..9e07b4e821 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -659,12 +659,18 @@ public: // destructor deletes m_thread 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 // 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(); + m_kind = kind; m_thread = new wxThreadHelperThread(*this, m_kind); return m_thread->Create(stackSize); @@ -692,6 +698,11 @@ protected: 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 inline void *wxThreadHelperThread::Entry() { -- 2.45.2