Allow wxThread::Wait() and Delete() to block, even under wxMSW.
Add "wait mode" parameter to these methods which can be used to make them block even under wxMSW where they currently dispatch messages when called which can be totally unexpected. Do keep the old behaviour for compatibility however, although it will change i 3.2. Closes #12998. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1425,7 +1425,7 @@ wxThreadError wxThread::Resume()
|
||||
// exiting thread
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
wxThread::ExitCode wxThread::Wait()
|
||||
wxThread::ExitCode wxThread::Wait(wxThreadWait WXUNUSED(waitMode))
|
||||
{
|
||||
wxCHECK_MSG( This() != this, (ExitCode)-1,
|
||||
wxT("a thread can't wait for itself") );
|
||||
@@ -1438,7 +1438,7 @@ wxThread::ExitCode wxThread::Wait()
|
||||
return m_internal->GetExitCode();
|
||||
}
|
||||
|
||||
wxThreadError wxThread::Delete(ExitCode *rc)
|
||||
wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode))
|
||||
{
|
||||
wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR,
|
||||
wxT("a thread can't delete itself") );
|
||||
|
||||
Reference in New Issue
Block a user