[pygtk] idle_add vs. threads_enter/threads_leave
Jason Heeris
jason.heeris at gmail.com
Tue Jul 6 15:36:02 WST 2010
Tim Evans wrote:
> Something worth noting is that if you're targeting Windows then 2.a. is
> your *only* option.
In fact, gtk.gdk.threads_init() will freeze straight off, you don't
need to wait for threads to start.
> I would also point out that "whenever it next feels like it" is almost
> always going to be the same as "right away" unless you're doing
> something yourself that still blocks the main thread.
Unfortunately, see my other email for my problems with
"glib.idle_add()" - basically, it doesn't work on Windows either.
There's a quick demo prog at:
http://github.com/detly/gtk-async-test
If you have access to a win32 box, run controller.py to see the
problem (or, in fact, fail to see it - you should click the start
button and see the progress bar go, if you don't, that's the problem).
It works fine under Debian.
So, in short, PyGTK + Windows + async = no :/
Cheers,
Jason
More information about the pygtk
mailing list