[patch] raise exceptions when you try to use python bindings without a mainloop

John (J5) Palmieri johnp at redhat.com
Tue Oct 4 09:49:46 PDT 2005


On Tue, 2005-10-04 at 17:40 +0100, Robert McQueen wrote:
> John (J5) Palmieri wrote:
> > The tough thing here is that I might add a generic main loop but there
> > is no way to tell that the generic mainloop driver is loaded but the
> > user used the glib mainloop.  More grr moments to come :-)  What I will
> > do is not add the generic mainloop automatically.  This way a user will
> > have to explicitly load it and will hopefully know they have to use that
> > mainloop.   The only other place this make sense is if the user does
> > pending calls but perhaps in those situations we should spit out a
> > warning and then convert it into a blocking call.  I'm not sure.
> 
> Yeah, whatever extra mainloop we add I'd always assumed it'd be import
> dbus.native or something, so the user always has to make a conscious
> choice of mainloop and the warning still holds. If someone asks for an
> async call and they've not set up a mainloop properly, blocking their
> app seems unwise. I'd just have it bail in that case too. Do you want me
> to do that?

Sounds like it is worth while.  Just make sure they can still make
blocking calls without a mainloop.
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list