Tracking DBusWatches
tsuraan
tsuraan at gmail.com
Wed Feb 7 09:54:12 PST 2007
> The socket is owned by and used directly by the DBusConnection; libdbus
> will write the DBusMessage to it (and read DBusMessage from it). The
> DBusWatch is just so you can select() or poll() on both the
> DBusConnection socket *and* some other descriptors specific to your
> application at the same time. In other words DBusWatch tells you which
> descriptors libdbus wants you to include in your main loop
> (select()/poll()).
>
> If you don't have any other descriptors you can ignore DBusWatch and
> just block in dbus_connection_read_write(), which will simply block on
> the connection socket.
So if I want to drop dbus into an existing application, I could just
make a thread dedicated to calling dbus_connection_read_write_dispatch
and register all my desired functions without really having to worry
about anything else? Is dbus thread-safe enough for that to work?
More information about the dbus
mailing list