On Fri, 2004-04-30 at 12:19 +0100, Stephen Kennedy wrote:
> > > >I am trying to write a threaded applet with PyGTK, starting up a thread
> > > >to get data off the Internet without blocking the UI.
> > I guess I'll either have to wait for PyGtk to get threading working
> > properly, or rewrite it with a fork(), pipe and pickle. Ugh.
> 
> gtk.input_add is probably what you want here.
> 
> Don't forget that cooperative threading is still an option. I've found
> it to be really excellent. You don't have to worry about locks, races or
> deadlocks. (see the faq) I use it extensively in meld.

Thanks, it turned out to be fairly painless once I remembered that you
have to use os._exit() rather than sys.exit() after a fork.

Cooperative threading looks a pretty useful technique, but it doesn't
really help when you're waiting on a Web server... I guess when the
gnomevfs bindings come out, I'll be able to use that instead, assuming
the async stuff gets implemented.

Thanks again,

Ed

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to