From kde-core-devel Wed Sep 22 10:00:06 2010 From: David Faure Date: Wed, 22 Sep 2010 10:00:06 +0000 To: kde-core-devel Subject: Using dbus from multiple threads Message-Id: <201009221200.06944.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=128514968517212 While QtDBus is threadsafe, there's a bug in libdbus < 1.4 which makes applications misbehave when using QDBusConnection::sessionBus() from multiple threads. For this reason, kdelibs/nepomuk has a DBusConnectionPool, which provides one dbus connection (to the session bus) per thread. Now the akonadi guys are having the same problem, and are about to put a copy of dbusconnectionpool in kdepimlibs/akonadi, at my advice. That's two users, would there be any others? In that case we could have a KDBusConnectionPool in kdecore, with a BusType argument added to the current code, so that solid can maybe use this for the SystemBus as well. The main downside of this, is that this is all a "temporary" workaround until everyone uses libdbus >= 1.4. But this might take quite some time, so I think we should still have this. We can always deprecate it in a few years, won't be the first time. -- David Faure, faure@kde.org, http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).