-// Yield to other processes
-
-bool wxApp::Yield(bool onlyIfNeeded)
-{
- static bool s_inYield = false;
-
- if ( s_inYield )
- {
- if ( !onlyIfNeeded )
- {
- wxFAIL_MSG( wxT("wxYield called recursively" ) );
- }
-
- return false;
- }
-
- s_inYield = true;
-
- while (wxTheApp && wxTheApp->Pending())
- wxTheApp->Dispatch();
-
- s_inYield = false;
-
- return true;
-}