]> git.saurik.com Git - wxWidgets.git/commitdiff
deprecate Create() function in favour of CreateThread(); its name is too generic...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 28 Nov 2008 17:43:34 +0000 (17:43 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 28 Nov 2008 17:43:34 +0000 (17:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/thread.h

index f595b3191e9a27a73c183dc5ffb492a7fb3ec358..9e07b4e8215867854fdf79750c208f21e0057e3b 100644 (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()
 {