[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Using dbus from multiple threads
From:       David Faure <faure () kde ! org>
Date:       2010-09-22 10:00:06
Message-ID: 201009221200.06944.faure () kde ! org
[Download RAW message or body]

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).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic