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:
@@ -629,6 +629,9 @@ void wxThreadInternal::SetPriority(unsigned int priority)
|
|||||||
|
|
||||||
bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
|
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
|
// 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
|
// creation instead of Win32 API one because otherwise we will have memory
|
||||||
// leaks if the thread uses C RTL (and most threads do)
|
// 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);
|
SetPriority(m_priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_state = STATE_NEW;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1183,8 +1183,6 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED(stackSize))
|
|||||||
return wxTHREAD_NO_RESOURCE;
|
return wxTHREAD_NO_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_internal->SetState( STATE_NEW );
|
|
||||||
|
|
||||||
return wxTHREAD_NO_ERROR;
|
return wxTHREAD_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user