Query on operation of dbus_connection_dispatch() and method call

Soh Kam Yung sohkamyung at gmail.com
Mon Mar 23 20:44:28 PDT 2009

I have a query on how libdbus's dbus_connection_dispatch() handles method calls.

I have a mainloop that runs dbus_connection_dispatch().  When a method
call arrives, my handler (registered using
dbus_connection_register_object_path()) gets called.  The handler
crafts a reply, sends the method reply and returns

Is it possible for my handler to return DBUS_HANDLER_RESULT_HANDLED to
the dispatcher, then craft a method reply in a separate thread (to
allow my mainloop to continue handling more incoming messages)?

I would like to do this:
1) dispatcher calls my handler
2) handler passes the incoming method call to a separate thread for
processing and to generate the method reply (which may be slow)
3) handler returns DBUS_HANDLER_RESULT_HANDLED to dispatcher
4) dispatcher continues handling other incoming mesages

Soh Kam Yung
my Google Reader Shared links:
my Google Reader Shared SFAS links:

More information about the dbus mailing list