[wxPython-users] calling wxPython functions from different thread

Tony Cappellini cappy2112 at gmail.com
Mon Feb 11 11:27:43 PST 2008


---------- Forwarded message ----------
From: Phil Mayes <phil at philmayes.com>
To: wxPython-users at lists.wxwidgets.org
Date: Mon, 11 Feb 2008 09:39:53 -0800
Subject: Re: [wxPython-users] calling wxPython functions from different thread
At 07:39 AM 2/11/2008, you wrote:
>hello again,

>>You can't update the user interface from any thread except the main
>>one.  Use wx.CallAfter() to call your function.

When you say "you can't update the user interface from any thread
except the main thread"
what does this really mean?

Does this mean that updating the GUI from another thread just won't
really update the GUI, or does one encounter an exception when trying
to do this?

How does the GUI framework differentiate one thread from another, or
one thread, from the main thread?
There must be some code that makes the "main thread" different from
other threads.

If each thread is just 100 byte codes or so that get executed before a
thread switch, then one can imagine the code as all being sequential
in nature, and not "really'" a different thread, as in OS-level
threads.




More information about the wx-users mailing list