]> git.saurik.com Git - wxWidgets.git/commitdiff
undid patch which was supposed to allow thread recreation and added instead an assert...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 May 2003 23:38:05 +0000 (23:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 May 2003 23:38:05 +0000 (23:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/thread.cpp
src/unix/threadpsx.cpp

index 92f34c9ca8b8914972b31ffd03b9be0b7aacc6f8..df5f2f2ba7b2f6d478c955e8be458afe63f169cf 100644 (file)
@@ -629,6 +629,9 @@ void wxThreadInternal::SetPriority(unsigned int priority)
 
 bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
 {
+    wxASSERT_MSG( m_state == STATE_NEW && !m_hThread,
+                    _T("Create()ing thread twice?") );
+
     // for compilers which have it, we should use C RTL function for thread
     // creation instead of Win32 API one because otherwise we will have memory
     // leaks if the thread uses C RTL (and most threads do)
@@ -674,8 +677,6 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
         SetPriority(m_priority);
     }
 
-    m_state = STATE_NEW;
-
     return TRUE;
 }
 
index a124ad443b4fba6549d69f83abe9ca7402aebe4f..597f87eb8dab0f164b498bad88bf414aeabe6da1 100644 (file)
@@ -1183,8 +1183,6 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED(stackSize))
         return wxTHREAD_NO_RESOURCE;
     }
 
-    m_internal->SetState( STATE_NEW );
-
     return wxTHREAD_NO_ERROR;
 }