[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: Detectin mainloop integration
From: "Havoc Pennington" <hp () redhat ! com>
Date: 2007-10-01 16:07:05
Message-ID: 815098350710010907u3cdd17e2j82eba5634f0b535a () mail ! gmail ! com
[Download RAW message or body]
Hi,
On 9/29/07, Sebastian Dröge <slomo@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...
> For themselves it makes sense to call setup more than once, even when
> there's only one corresponding unsetup somewhere, as with the current
> behaviour it simply unintegrates from the old GMainContext and
> integrates into the new. Do you think it makes sense to stop this
> behaviour?
Calling setup() twice on the same connection should be a no-op I
think, except that if there's an unsetup() you should have to call it
as many times as you called setup().
The point is that a plugin or something should be able to setup()
"just in case" without knowing if the main app already did it.
> 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.
> 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?
Havoc
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic