use a common m_isInsideYield flag instead of static booleans in all ports; add a IsYielding() test which can help to fix unwanted re-entrancies
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -171,9 +171,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
return true; // can't process events from other threads
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
static bool s_inYield = false;
|
||||
|
||||
if ( s_inYield )
|
||||
if ( m_isInsideYield )
|
||||
{
|
||||
if ( !onlyIfNeeded )
|
||||
{
|
||||
@@ -183,7 +181,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
return false;
|
||||
}
|
||||
|
||||
s_inYield = true;
|
||||
m_isInsideYield = true;
|
||||
|
||||
#if wxUSE_LOG
|
||||
wxLog::Suspend();
|
||||
@@ -203,7 +201,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
wxLog::Resume();
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
s_inYield = false;
|
||||
m_isInsideYield = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user