-// Yield to other processes
-
-bool wxApp::DoYield(bool onlyIfNeeded, long eventsToProcess)
-{
- if ( m_isInsideYield )
- {
- if ( !onlyIfNeeded )
- {
- wxFAIL_MSG( wxT("wxYield called recursively" ) );
- }
-
- return false;
- }
-
- m_isInsideYield = true;
- m_eventsToProcessInsideYield = eventsToProcess;
-
- wxEventLoopGuarantor dummyLoopIfNeeded;
- while (wxTheApp && wxTheApp->Pending())
- // TODO: implement event filtering using the eventsToProcess mask
- wxTheApp->Dispatch();
-
- m_isInsideYield = false;
-
- return true;
-}