aboutsummaryrefslogtreecommitdiff
path: root/src/core/ksharedconfig.h
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2014-06-14 11:18:26 +0200
committerDavid Faure <faure@kde.org>2014-06-22 10:32:57 +0200
commitfdbcede38d1226b6dcfcf7dbebaecffcb0e962d5 (patch)
treeb35bf781d7539d2b59e40a279919b3bbfac8c3d0 /src/core/ksharedconfig.h
parente782f0adc99dbcfedabb5f1c90f192151b545b00 (diff)
downloadkconfig-fdbcede38d1226b6dcfcf7dbebaecffcb0e962d5.tar.gz
kconfig-fdbcede38d1226b6dcfcf7dbebaecffcb0e962d5.tar.bz2
Make KSharedConfig thread-safe
... by having a different list of shareable objects per thread. REVIEW: 118739
Diffstat (limited to 'src/core/ksharedconfig.h')
-rw-r--r--src/core/ksharedconfig.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/ksharedconfig.h b/src/core/ksharedconfig.h
index 03f05b08..b2317afd 100644
--- a/src/core/ksharedconfig.h
+++ b/src/core/ksharedconfig.h
@@ -30,12 +30,16 @@
*
* KConfig variant using shared memory
*
- * KSharedConfig provides a reference counted, shared memory variant
+ * KSharedConfig provides a shared (reference counted) variant
* of KConfig. This allows you to use manipulate the same configuration
* files from different places in your code without worrying about
* accidentally overwriting changes.
*
- * Note that, as with most of kdelibs, this is @b NOT threadsafe.
+ * The openConfig() method is threadsafe: every thread gets a separate repository
+ * of shared KConfig objects. This means, however, that you'll be responsible for
+ * synchronizing the instances of KConfig for the same filename between threads,
+ * using reparseConfiguration after a manual change notification, just like you have
+ * to do between processes.
*/
class KCONFIGCORE_EXPORT KSharedConfig : public KConfig, public QSharedData //krazy:exclude=dpointer (only for refcounting)
{