dbus and multithreading

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jun 1 09:55:16 PDT 2011


On Wed, 01 Jun 2011 at 19:04:19 +0300, Leonid Yurchenko wrote:
> So question is open
> for me - is dbus glib considered as thread safe?

No, there's no locking at all in dbus-glib.

> And will these
> issues be addressed any time soon, or we are stuck with one-threaded
> (gmainloop) approach?

I have no particular interest in making dbus-glib thread-safe, although I'll
apply good patches if they come with regression tests.

I'd recommend using GDBus (part of GIO, in modern GLib releases), particularly
if you like threads: GDBus is already much closer to thread-safe than
dbus-glib, and is better-designed and much more actively maintained.

    S


More information about the dbus mailing list