C convenience lib (was Re: Is dbus_pending_call_set_notify() thread safe?)

Havoc Pennington hp at redhat.com
Wed Aug 1 14:52:36 PDT 2007


Hi,

nf2 wrote:
> I remember there were some problems with Qt and GLib based libraries, 
> not being able to share the same D-BUS connection

Only one of Qt or GLib can set up the main loop for a connection, but 
once one of them has, any other lib should be able to use the connection 
set up by the other in theory. In practice I think there are issues, but 
they would be solvable if this were something people really cared about 
in practice.

> (although Qt can be 
> built with GLib support). Now, if Qt uses "gbus" when built with GLib 
> main-loop support - would this problem go away?

gbus (well, the one I posted anyway) is not a real thing, just a sketch 
of what a real thing could be like.

I don't think a hypothetical C convenience lib would resolve this issue, 
though. Either it would not set up any main loop so the issue would 
remain at a higher layer, or it would set up the GLib main loop and 
cause the issue in the same way today's glib bindings do.

The solution to this problem is maybe something like a way for someone 
to mark the DBusConnection as "I will dispatch this connection" and then 
other libs would not try to do so.

Havoc



More information about the dbus mailing list