"DBus Embedded" - a clean break

Havoc Pennington hp at pobox.com
Thu Jan 20 12:49:40 PST 2011


On Thu, Jan 20, 2011 at 3:36 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> Last time I looked at libev it was an awful mess with a lot of global
> state (making it hard to use properly in a threaded env) and stuff. I
> wasn't convinced.

The main loop is only used in dbus-daemon itself, and maybe in some of
the utilities; it's not used by libdbus. So thread safety doesn't

libev is a little not-cosmetic but it's certainly far more functional,
performant, and widely-tested than the ad hoc thing I wrote in
dbus-mainloop.c, and almost certainly better than anything anyone else
would write in a reasonable amount of time, too. It's also already
done all the work for use-assorted-alternatives-to-poll. node.js has
banged the hell out of libev.

What I'd do is encapsulate it in a file with a nicer API (maybe even
the existing mainloop API or one like it) so it doesn't leak all over
the codebase. But it's a very pragmatic thing to use.


More information about the dbus mailing list