New event locking.

Removed CVS trash.
  Some compile fixes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-11-28 11:45:29 +00:00
parent 0979c96223
commit 16c1f79c04
10 changed files with 81 additions and 36 deletions

View File

@@ -47,22 +47,31 @@
void wxAppBase::ProcessPendingEvents()
{
// ensure that we're the only thread to modify the pending events list
wxCRIT_SECT_LOCKER(locker, *wxPendingEventsLocker);
wxENTER_CRIT_SECT( *wxPendingEventsLocker );
if ( !wxPendingEvents )
{
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
return;
}
// iterate until the list becomes empty
wxNode *node = wxPendingEvents->First();
while (node)
{
wxEvtHandler *handler = (wxEvtHandler *)node->Data();
handler->ProcessPendingEvents();
delete node;
// In ProcessPendingEvents(), new handlers might be add
// and we can safely leave the critical section here.
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
handler->ProcessPendingEvents();
wxENTER_CRIT_SECT( *wxPendingEventsLocker );
node = wxPendingEvents->First();
}
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
}
int wxAppBase::OnExit()