Revision 1191220
Go back to digest for 31st October 2010Optimization in KDE Base
Michael Pyne committed changes in /trunk/KDE/kdelibs/kdecore/util/kshareddatacache.cpp:
Add cache-initialized guard to KSharedDataCache::setEvictionPolicy.
While adding the guard I noticed that I'm dumb in two ways:
1. I flipped the required memory ordering when adding cache timestamp support (it should be load-with-acquire, store-with-release in general).
2. ossi mailed about wondering why I used a loop, and I gave an honest answer.
If only he'd pointed out where I'd managed to successfully implement an atomic store months ago without a loop (or if only I'd looked up a bit higher when adding the code....) So the loop is eliminated by using fetchAndStoreRelease().
File Changes
Modified 1 files
- /trunk/KDE/kdelibs/kdecore/util/kshareddatacache.cpp
1 files changed in total