D13627: [KIconThemes] Isolate private data from race conditions
Anthony Fieroni
noreply at phabricator.kde.org
Thu Jun 21 11:26:49 UTC 2018
anthonyfieroni added inline comments.
INLINE COMMENTS
> anthonyfieroni wrote in kiconloader.cpp:616
> Yeah, i saw it, i'll made a sequenceLock like this
>
> void sequenceLock(std::function<void()> func)
> {
> QMutexLocker locker(&mutex);
> func():
> }
> //usage
> S_D(d)->sequenceLocker([d, _appname, extraSearchPaths]() {
> d->mIconCache->clear();
> d->clear();
> d->init(_appname, extraSearchPaths);
> });
>
> Are you ok with such approach?
Even QMutexLocker locker(&mutex); will not present or it'll deadlock. Only sequenceLocker with func() in.
REPOSITORY
R302 KIconThemes
REVISION DETAIL
https://phabricator.kde.org/D13627
To: anthonyfieroni, davidedmundson, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180621/af55c5cf/attachment.html>
More information about the Kde-frameworks-devel
mailing list