make POSIX and Windows implementation of wxThread::Run() coherently assert when trying to Run() a thread twice; add a test for it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -788,7 +788,7 @@ enum
|
||||
|
||||
if (m_pThread) // does the thread still exist?
|
||||
{
|
||||
m_out.Printf("MYFRAME: deleting thread");
|
||||
wxMessageOutputDebug().Printf("MYFRAME: deleting thread");
|
||||
|
||||
if (m_pThread->Delete() != wxTHREAD_NO_ERROR )
|
||||
wxLogError("Can't delete the thread!");
|
||||
@@ -1125,6 +1125,10 @@ public:
|
||||
of detached threads.
|
||||
|
||||
This function can only be called from another thread context.
|
||||
|
||||
Finally, note that once a thread has completed and its Entry() function
|
||||
returns, you cannot call Run() on it again (an assert will fail in debug
|
||||
builds or @c wxTHREAD_RUNNING will be returned in release builds).
|
||||
*/
|
||||
wxThreadError Run();
|
||||
|
||||
|
Reference in New Issue
Block a user