[KUiServerJobTracker] Register jobs asynchronously
AbandonedPublic

Authored by broulik on May 10 2019, 1:40 PM.

Details

Reviewers
dfaure
davidedmundson
Group Reviewers
Frameworks
Summary

Don't block waiting for the server to register the job, especially since it is typically only shown after 500ms anyway.
I also don't see how the job could be deleted from under us inside that function, so I removed all those early returns,

Test Plan

Froze the server, app didn't block waiting in the register call anymore.
Let the job finish and then unfroze the app, got a reply but it found the job already deleted and didn't do anything and didn't crash.

Diff Detail

Repository
R288 KJobWidgets
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.May 10 2019, 1:40 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 10 2019, 1:40 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.May 10 2019, 1:40 PM
broulik edited the summary of this revision. (Show Details)
broulik updated this revision to Diff 57864.May 10 2019, 1:54 PM
  • When reply comes in after job already finished, call terminate on the jobview to end it gracefully
broulik planned changes to this revision.May 10 2019, 1:58 PM

However now it obviously misses the first calls to set message and what not because the job view doesn't yet exist there...

broulik abandoned this revision.May 29 2020, 7:06 AM

I've got a jobviewv2 thing in the works which is qvariantmap-based so it can easily queue any changes and send them out once registered. I think jobviewv1 should just stay as is and be phased out eventually, cf. T12574