avoid blocking kio_http_cache_cleaner and ensure exit with session
ClosedPublic

Authored by mkoller on Dec 22 2018, 7:44 PM.

Details

Summary

Currently when logging out, kio_http_cache_cleaner stays alive and blocks in
QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents);
forever.

This patch avoids this blocking and ensures that the main loop will exit when the session bus is no longer connected.

BUG: 367575
FIXED-IN: 5.54

Test Plan

logging in, check CPU load of kio_http_cache_cleaner, log out, check if kio_http_cache_cleaner still runs.

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
mkoller created this revision.Dec 22 2018, 7:44 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 22 2018, 7:44 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mkoller requested review of this revision.Dec 22 2018, 7:44 PM
mkoller edited the summary of this revision. (Show Details)

I assume the processEvents() is necessary to process DBus disconnection, then?

In that case let's add a comment, so the next person doesn't think this is unnecessary (it's certainly not necessary for the QLocalServer/QLocalSocket stuff).

ngraham edited the summary of this revision. (Show Details)Dec 23 2018, 4:09 AM
mkoller updated this revision to Diff 48084.Dec 23 2018, 5:07 PM

David is right, processEvents() seems not be needed at all - removed it.

Actually while testing, I found some other bugs - mainly read/write of the scoreboard and the info from the slaves
where one side wrote qint64 but the other interpreted it as a QDateTime or the file size was expected to be 64bit in
one code part, but on another code part it was assumed to be 32bit...

dfaure accepted this revision.Jan 7 2019, 8:49 AM
This revision is now accepted and ready to land.Jan 7 2019, 8:49 AM
This revision was automatically updated to reflect the committed changes.