John (J5) Palmieri johnp at redhat.com
Wed Sep 13 09:01:20 PDT 2006

On Wed, 2006-09-13 at 10:47 +0200, frederic heem wrote:
> Hi,
> Why dbus_g_thread_init() is not initialized in dbug_g_get() ? I guess the dbus 
> team wants to increase runtime speed in the case threads are not used. I've 
> just lost hours of work because this function calls was missing. Developement 
> speed is an issue as far as I'm concerned, not a 0.002% runtine speed 
> increase in case the app is not threaded.
> The thread system should be initialized by default, for zealots who are 
> concerned with hardly measurable speed increase, let's add a function that 
> uninitialized the thread system.

While your frustration is understandable your solution is not well
thought out.  Part of the problem is documentation which we do need to 
work on.  The real solution here is making threading evident to even
those who don't use it but may in the future.  I got a lot of pushback
from suggesting we turn on threads full time.  And no it was not from

The idea is to have a public dbus_g_init(gboolean is_threaded) function.
Most libraries have an init function so this is fine and we need it
anyway since the type system is currently initialized by dbus_g_bus_get
and there are instances where you need to use dbus types before you get
a connection.

John (J5) Palmieri <johnp at redhat.com>

More information about the dbus mailing list