Performance of method calls in D-Bus GLib

Colin Walters walters at verbum.org
Thu May 14 10:19:28 PDT 2009


On Thu, May 14, 2009 at 1:07 PM, Abhijeet Kumar Sinha
<abhijeet.aks at gmail.com> wrote:
>
> dbus_connection_read_write(conn,0);
> msg = dbus_connection_pop_message(conn);
> if ( NULL == msg ){
>         usleep(1000);
>        continue;
> }
> I re-wrote the code using glib, to use the glib mainloop.

I wanted to reply to your earlier message to this effect - I'm not
sure that loop is correct, though it needs analysis.  Basically, using
DBus not with a mainloop is tricky and not as well tested.

> random_dbus_signal.sh -- is the client side script which sleeps for random
> seconds and then wake up and calls a method of the server -- uses dbus-send
> --system --type=method_call

Unfortunately, there is definitely a DBus bug here.  You need to use
--print-reply.  See discussion here:

http://lists.freedesktop.org/archives/dbus/2009-March/011054.html


More information about the dbus mailing list