[pygtk] Database query in a gobject.idle_add()?

Pietro Battiston toobaz at email.it
Thu Sep 10 16:40:43 WST 2009


Il giorno gio, 10/09/2009 alle 12.02 +1200, Greg Ewing ha scritto:
> Kim Adil wrote:
> > Would you advise implementing the database 
> > query using gobject.idle_add() or just create a separate thread 
> > (gtk.threads_enter(), gtk.threads_leave(),etc)?
> 
> I would recommend using gobject.idle_add() if at all
> possible. Best to avoid the hassles of dealing with
> threads in a GUI context if you can.
> 

I would say it all depends on how much time takes the query itself.

(right?)


--------------------------------------------------------------------

Please, set mailman so that "reply" goes to list.

Pietro



More information about the pygtk mailing list