Regarding Performance of DBUS library

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Aug 29 05:43:45 PDT 2012


On 29/08/12 13:18, rajnikant jachak wrote:
> But client dumping
> core (Abort Signal) while receiving the responses.

Your client is multi-threaded, but does not call
dbus_threads_init_default(). That isn't expected to work.

> 2. Is it recommended to use DBUS library in multi-threading applications?

No. In theory it's meant to work (if you call
dbus_threads_init_default() before calling any D-Bus APIs or starting
your second thread), but you have to be really careful, and restricting
your use of D-Bus to one thread results in more predictable behaviour.

Alternatively, use GDBus (in GIO, part of GLib) which was designed with
multi-threading in mind.

    S


More information about the dbus mailing list