Raw libdbus dispatching

Havoc Pennington hp at redhat.com
Tue Oct 24 14:10:04 PDT 2006


Havoc Pennington wrote:
>> Can dbus_connection_dispatch() block?
> 
> It won't block on its own, but it does call the application handlers for 
> each message, and those handlers could block (or do anything else) if 
> they felt like it. This is true for any application code though, also 
> for X event handlers and such.
> 

To be clear, not only does it not block, dbus_connection_dispatch() 
never does any IO (unless the app message handler does).

On the DBusConnection doxygen page I talked a bit about how there are 
three operations (read, write, and dispatch) and what they each consist of.

read = fill the incoming queue by reading from socket
write = drain the outgoing queue by writing to socket
dispatch = drain the incoming queue by running app handlers

Havoc



More information about the dbus mailing list