anthonyfieroni added inline comments. INLINE COMMENTS
> kpropertiesdialog.cpp:2798-2804 > + const QString cache = cachedChecksum(alg); > + if (!cache.isEmpty()) { > + return cache; > + } > > -void KChecksumsPlugin::slotShowSha256() > -{ > - auto label = new QLabel(i18nc("@action:button", "Calculating..."), > &d->m_widget); > - label->setTextInteractionFlags(Qt::TextSelectableByMouse | > Qt::TextSelectableByKeyboard); > + const QString checksum = computeChecksum(alg, path); > + cacheChecksum(checksum, alg); You don't understand me, now you have a race condition. cachedChecksum reads from cache while cacheChecksum writes. It's a race condition and you need mutex here. When you add here you will not needed anymore in cacheChecksum. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D8536 To: petermajchrak, elvisangelaccio, #vdg, colomar Cc: colomar, anthonyfieroni, bcooksley, alexeymin, ngraham, elvisangelaccio, #frameworks