KDE/kdelibs

David Faure faure at kde.org
Wed Mar 4 20:53:04 CET 2009


SVN commit 935291 by dfaure:

Make ksycoca threadsafe. Summary of changes:
- OOo design for the 4 ways to access ksycoca data (mmap, qfile, shared mem, dummy qbuffer),
  which also allows to have a KConfig key for choosing the technology to use.
- per-thread KSycoca::self() and per-thread sycoca factories, using QThreadStorage.
  This way ksycoca updates are handled by each thread at its own pace (assuming it has an event loop).
- threaded unit test: two in kservicetest, plus the standalone ksycocathreadtest.cpp

=> KRunner and kdevelop (and others) can now use KService and KMimeType and K*TypeTrader from threads without a mutex.
(If in doubt about races in your threads, I suggest valgrind --tool=helgrind, using valgrind svn preferrably.
You'll hit some races in Qt that I reported recently though)

CCMAIL: rodda at kde.org, plasma-devel at kde.org


 M  +20 -25    kdecore/services/kmimetypefactory.cpp  
 M  +0 -2      kdecore/services/kmimetypefactory.h  
 M  +41 -49    kdecore/services/kservicefactory.cpp  
 M  +1 -3      kdecore/services/kservicefactory.h  
 M  +20 -26    kdecore/services/kservicegroupfactory.cpp  
 M  +0 -2      kdecore/services/kservicegroupfactory.h  
 M  +28 -33    kdecore/services/kservicetypefactory.cpp  
 M  +0 -3      kdecore/services/kservicetypefactory.h  
 M  +13 -3     kdecore/services/kservicetypeprofile.cpp  
 M  +9 -4      kdecore/sycoca/kprotocolinfofactory.cpp  
 M  +3 -6      kdecore/sycoca/kprotocolinfofactory.h  
 M  +288 -254  kdecore/sycoca/ksycoca.cpp  
 M  +42 -21    kdecore/sycoca/ksycoca.h  
 A             kdecore/sycoca/ksycocadevices_p.h   branches/work/~dfaure/kdelibs-ksycoca-threadsafety/kdecore/sycoca/ksycocadevices_p.h#935278 [License: LGPL (v2/3+eV)]
 M  +1 -1      kdecore/sycoca/ksycocadict.cpp  
 M  +3 -1      kdecore/sycoca/ksycocadict.h  
 M  +21 -16    kdecore/sycoca/ksycocafactory.cpp  
 M  +60 -4     kdecore/sycoca/ksycocafactory.h  
 M  +1 -0      kdecore/tests/CMakeLists.txt  
 M  +1 -1      kdecore/tests/kmimetypetest.cpp  
 M  +88 -8     kdecore/tests/kservicetest.cpp  
 M  +8 -0      kdecore/tests/kservicetest.h  
 M  +1 -0      kdecore/tests/ksycocadicttest.cpp  
 A             kdecore/tests/ksycocathreadtest.cpp   branches/work/~dfaure/kdelibs-ksycoca-threadsafety/kdecore/tests/ksycocathreadtest.cpp#935287 [License: LGPL (v2/3+eV)]
 M  +2 -0      kded/kbuildmimetypefactory.cpp  
 M  +4 -0      kded/kbuildservicefactory.cpp  
 M  +2 -0      kded/kbuildservicegroupfactory.cpp  
 M  +39 -36    kded/kbuildsycoca.cpp  
 M  +4 -1      kded/kbuildsycoca.h  
 M  +12 -13    kded/kctimefactory.cpp  
 M  +2 -1      kded/kded.cpp  
 M  +1 -1      kded/kmimefileparser.cpp  
 M  +1 -1      kded/test/kmimeassociationstest.cpp  
 M  +2 -2      kded/vfolder_menu.cpp  
 M  +1 -1      kio/kio/kbuildsycocaprogressdialog.cpp  
 M  +6 -6      kio/kio/kmimetypechooser.cpp  
 M  +1 -1      kio/kio/kmimetypechooser.h  




More information about the Plasma-devel mailing list