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:
Francesco Montorsi 2008-11-28 17:43:34 +00:00
parent 43a0d1e1e9
commit 3d5930b5ea

View File

@ -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()
{