If ProcessEvent is called from the non-main thread then it redirects the
call to AddPendingEvent.
Robin,
That's very interesting. It seems to work fine once I corrected my error and indeed used ProcessEvent(), other than update flicker which I will deal with in a bit. I was assuming the message queue was being inundated with the CORBA messages, but perhaps not. If EVT_IDLE can occur while the CORBA messages are coming in (is a GUI related thing only), or if the CORBA messages are not as frequent as I had thought, that would explain the update frequency I am seeing now.
Thanks for the thread blocking idea.
Bruce
ยทยทยท
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Tuesday, March 04, 2003 11:57 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] new to event processing, need to force
refre sh?
brucedickey wrote:
Hmmm... Well Update() appeared to work, but when the number of
messages is increased to hundreds, it is apparent that what is really
happening is that all the messages are recieved and queued. After the
last one is recieved, they are all displayed and the xwHtmlWindow is
updated between each one.What I really need is to update the wxHtmlWindow after each message
*as it is recieved*, without them being queued up.Anybody know why this is happening, given that I am using
ProcessEvent() instead of AddPendingEvent() in the CORBA server
thread?
If ProcessEvent is called from the non-main thread then it redirects the
call to AddPendingEvent. (wxPostEvent also uses AddPendingEvent.)
Those events are processed the next time there is an EVT_IDLE event.
There is no simple way to force an event to happen before control
returns to the caller in a non-gui thread. The only way I can think of
to ensure that your event has been processed before returning from the
CORBA method call is block the thread and wait for some signal from the
event handler. Perhaps using a threading.Event will do it for you.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org