On Wed, 2005-10-12 at 15:48 +0200, Mikkel Kamstrup Erlandsen wrote: > Good catch! We generally have to make sure any gtk stuff called from > initialize () is surrounded by gtk.threads_{enter,leave}... I don't know > if this is done... > > When we implement async handlers at some point writers of such handlers > should also note that any gtk interaction should be surrounded by > gtk.threads_{enter,leave}. > > I'll pu this in AsyncHandler __doc__-strings. > > Cheers > Mikkel > That was probably the cause of the Async Xlib reply. Concerning this, couldn't we surround the module.initialize() with threads enter/leave in the module_loader.py ? Or would that render threads useless ? By the way, the network places isn't the only one using gconf or gtk methods while called in a thread, i think mozilla and epiphany have gconf usage in global scope to retreive the browser preference. Must these also be placed in threads ? I hate threads. Raf > On Wed, 2005-10-12 at 14:06 +0100, Joao Inacio wrote: > > the network places module hangs in the test, and this makes it work for me: > > > > def _scan_network_places(self): > > + gtk.threads_enter() > > client = gconf.client_get_default() > > if not client.dir_exists(NETWORK_PLACES_GCONF): > > + gtk.threads_leave() > > return > > > > dirs = client.all_dirs(NETWORK_PLACES_GCONF) > > + gtk.threads_leave() > > > > > > On 10/11/05, Raphael Slinckx <raphael slinckx net> wrote: > > > On Tue, 2005-10-11 at 10:04 +0200, Mikkel Kamstrup Erlandsen wrote: > > > > > > > > > > The concerning fact was that the window was slow to come up. Digging > > > > > through the code I tracked this down to the signals emitted from the > > > > > ModuleLoader. I gave them the same priority as default GTK events. > > > > > Seemingly this was way to aggressive. Changing this to > > > > > gobject.PRIORITY_DEFAULT_IDLE did the trick. > > > > > > > > > > > > > > > Raphael: > > > > > You modifications to my initial patch are most welcome. They work out > > > > > fine for me... I didn't know that python had a thread safe Queue ready > > > > > to plug in. That is a valuable trick! > > > > > > > > > > > Hi ! > > > > > > Ok, i'm ready to put this in CVS, the idle_priority makes indeed the UI > > > appear smoothly, all handlers are ported, i cleaned some debug messages, > > > and added the blocking module in CVS, but it will of course not be > > > installed (only EXTRA_DIST'ed). I also set the priority to 0 so it does > > > not clutter testing. > > > > > > Now the question is: Should we release something before we integrate > > > this and the async handler patches ? Mikkel and me thought it was a good > > > idea, so we release often, release early. We will then merge the async > > > module patch and async handler patch and make release again. > > > > > > Nigel, Mikkel is that ok ? Do we have critical things to fix before > > > making a new release ? > > > > > > Raf > > > PS. Attached is the new patch for async module, to be applied to clean > > > CVS > > > > > > > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v1.4.1 (GNU/Linux) > > > > > > iD8DBQBDS+4Wd7A94rlhffIRArAhAJ48TgNYRCU1TQxm64uWHtPoIbp6+gCggQY8 > > > HMVUdL3dqEQFDOF5JS1y7DY= > > > =ddwc > > > -----END PGP SIGNATURE----- > > > > > > > > > _______________________________________________ > > > deskbar-applet-list mailing list > > > deskbar-applet-list gnome org > > > http://mail.gnome.org/mailman/listinfo/deskbar-applet-list > > > > > > > > > > > > > > > > > > -- > > João Inácio > > jcinacio gmail com > > _______________________________________________ > > deskbar-applet-list mailing list > > deskbar-applet-list gnome org > > http://mail.gnome.org/mailman/listinfo/deskbar-applet-list > > > >
Attachment:
signature.asc
Description: This is a digitally signed message part