Hey,
I have a GUI that is accessing a remote resource. While it is doing so,
the GUI is frozen. Should I be spawning a thread to process gui events?
What's the right way to handle this?
Thanks,
Mike
···
--
Michael P. Soulier <msoulier@digitaltorque.ca>
"Those who would give up esential liberty for temporary safety deserve
neither liberty nor safety." --Benjamin Franklin
If you use threads you should use a thread for the remote call, not for the
gui events. Although doable, wx isn't particularly happy being run in a
thread. If the remote call is something not done constantly stuff that code
into a thread and use something like a wx.timer to check on the result of the
thread. That way your gui won't freeze.
If your program uses remote calls all the time you might want to think about
using something like twisted (twistedmatrix.com). Twisted can do a lot when
it comes to remote calls, but you'll have to invest some time into figuring
out how to make it compatible with your gui.
···
On Monday 12 September 2005 06:04, Michael P. Soulier wrote:
Hey,
I have a GUI that is accessing a remote resource. While it is doing so,
the GUI is frozen. Should I be spawning a thread to process gui events?
What's the right way to handle this?
Thanks,
Mike
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417