Running dbus_connection_read_write_dispatch in a separate thread

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Thu Jun 18 23:22:18 UTC 2020


On Thu, 18 Jun 2020 17:26:41 +0100, Simon McVittie wrote:

> Unfortunately, libdbus tries to be all things to all people, so it
> half-supports all main loops and no main loop equally, rather than
> fully supporting one and rejecting all the others.

I think the design of libdbus is quite reasonable, given that the C
language itself does not define an event-loop API. Particularly since
it’s supposed to be a reference implementation.

> The libdbus API documentation has some wise words about libdbus which
> probably apply here:
> 
>     This manual documents the *low-level* D-Bus C API. **If you use
> this low-level API directly, you're signing up for some pain.**

I never quite understood this. Unless by “pain” you mean “callbacks”.
I’ve used APIs with callbacks lots of times before, and I appreciate
their generality. So libdbus was nothing new in this regard.


More information about the dbus mailing list