git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12119 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
     bool ProcessIdle();
     void DeletePendingObjects();
 
+    virtual bool Yield(bool onlyIfNeeded = FALSE);
+
 private:
     DECLARE_DYNAMIC_CLASS(wxApp)
     DECLARE_EVENT_TABLE()
 
 
 static bool gs_inYield = FALSE;
 
-bool wxYield()
+bool wxApp::Yield(bool onlyIfNeeded)
 {
+    if ( gs_inYield )
+    {
+        if ( !onlyIfNeeded )
+        {
+            wxFAIL_MSG( wxT("wxYield called recursively" ) );
+        }
+
+        return FALSE;
+    }
+
 #if wxUSE_THREADS
     if ( !wxThread::IsMain() )
     {
     return TRUE;
 }
 
-bool wxYieldIfNeeded()
-{
-    if (gs_inYield)
-        return FALSE;
-
-    return wxYield();
-}
-
 
 //-----------------------------------------------------------------------------
 // wxWakeUpIdle