send_with_reply_and_block returning only after pending call times out

Simon McVittie smcv at collabora.com
Wed Aug 1 13:48:00 UTC 2018


On Wed, 01 Aug 2018 at 18:49:49 +0530, Sriram Gopalan wrote:
> On Wed, Aug 1, 2018 at 6:39 PM, Simon McVittie <[1]smcv at collabora.com> wrote:
>     Are you sharing the same connection between multiple threads in your
>     client?
> 
> Yes. Very much.

If at all possible I would recommend using a separate DBusConnection per
thread, or using a single DBusConnection in a "main" thread and posting
requests to that thread from other threads using some thread-safe
communication abstraction like GLib's GMainContext.

libdbus was always designed to be thread-safe, but 15 years after it
was initially implemented we are still finding thread-safety bugs,
so it seems very likely that similar bugs remain present.

    smcv


More information about the dbus mailing list