cross-thread update requests

"Greg Hewgill" <[email protected]> Thu, 12 May 2005 11:23:19 -0500
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
I'm writing an application that has a GUI and needs to have a separate
network communications thread (the network communications will often
block so it's not appropriate to do the network stuff in the UI thread).
What I need to do is send some kind of request to the associated GUI
window to update the display when new information is retrieved from the
network. I was calling Refresh() on the associated Window object, but
that seems to be causing lockups and crashes. It looks like I need to
use AddPendingEvent() but I'm not sure what kind of event is appropriate
for this type of thing, or whether such an event type already exists.

What's the usual way of doing this?

Greg Hewgill
smime.p7s (application/x-pkcs7-signature, 2.8 KB) - not displayed