undid patch which was supposed to allow thread recreation and added instead an assert preventing it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-05-08 23:38:05 +00:00
parent faad0a95e1
commit 50ef440170
2 changed files with 3 additions and 4 deletions

View 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;
}

View 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;
}