Review Request: Workaround for non-thread-safety of QDBusConnection

Oswald Buddenhagen ossi at kde.org
Thu May 27 15:15:06 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4166/#review5888
-----------------------------------------------------------


wouldn't the time be better spent fixing libdbus rather than creating heaps of workarounds?

- Oswald


On 2010-05-27 13:55:33, Sebastian Trueg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4166/
> -----------------------------------------------------------
> 
> (Updated 2010-05-27 13:55:33)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> As many of us experienced already QDBusConnection is not thread-safe. As you can see in Qt bug 7475 (http://bugreports.qt.nokia.com/browse/QTBUG-7475) this is not Qt's fault but an issue in libdbus which has been reported a rather long time ago (https://bugs.freedesktop.org/show_bug.cgi?id=17754). In Nepomuk we work around this problem using a pool of connections, one for each thread. This is no perfect solution but at least we get no more crashes. The same applies to KSycoca, too. It is used in multi-threading situations at least in Dolphin.
> Thus, this patch moves the DBusConnectionPool to kdecore, making it privately available to all kdelibs components.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdecore/util/dbusconnectionpool.cpp PRE-CREATION 
>   trunk/KDE/kdelibs/kdecore/CMakeLists.txt 1130392 
>   trunk/KDE/kdelibs/kdecore/sycoca/ksycoca.cpp 1130392 
>   trunk/KDE/kdelibs/kdecore/util/dbusconnectionpool.h PRE-CREATION 
>   trunk/KDE/kdelibs/nepomuk/core/CMakeLists.txt 1130392 
>   trunk/KDE/kdelibs/nepomuk/core/dbusconnectionpool.h 1130392 
>   trunk/KDE/kdelibs/nepomuk/core/dbusconnectionpool.cpp 1130392 
> 
> Diff: http://reviewboard.kde.org/r/4166/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sebastian
> 
>





More information about the kde-core-devel mailing list