Detectin mainloop integration

Sebastian Dröge slomo at circular-chaos.org
Mon Oct 1 23:34:45 PDT 2007


Am Montag, den 01.10.2007, 12:07 -0400 schrieb Havoc Pennington:
> Hi,
> 
> On 9/29/07, Sebastian Dröge <slomo at circular-chaos.org> wrote:
> > Refcount on what? They currently ref/unref the main context that gets
> > set and in my local branch ref/unref the connection (from the GSources,
> > unref happens when either it's unsetup or the GMainContext gets freed).
> 
> The point is if there's an unsetup(), you have to call it N times if
> you did setup() N times. Otherwise, you can't know it's safe to
> unsetup() since someone else may have setup() also.
> 
> I would think that either we need the setup/unsetup pairing like this,
> or we should not have an unsetup() since using it would be
> dangerous...

Ok, I'll change it accordingly then. Also it makes sense then to have
additional setup() calls only increase the refcount and not set a new
main context, etc for the same reasons.

> > I only added it now because of a assertion in dbus-glib
> > (dbus_connection_get_g_connection).
> 
> Yeah, we should just get rid of this I think.

Ok :)

> > Sounds good, having such <1000 line library separate is insane :) Also
> > having some kind of C convenience lib is definitely needed IMHO.
> >
> 
> Can you prepare a patch against the dbus git repo?

Sure, I'll have it finished in a few hours probably.



More information about the dbus mailing list