[KDynamicJobTracker] Ask kuiserver asynchronously
AbandonedPublic

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

Details

Reviewers
dfaure
davidedmundson
Group Reviewers
Frameworks
Summary

This is only a fallback option so it shouldn't jeopardize the application by potentially blocking waiting for the server.

Test Plan

Together with D21126 I can now use Dolphin fully without blocking when the server is frozen

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.May 10 2019, 1:43 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 10 2019, 1:43 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.May 10 2019, 1:43 PM
dfaure requested changes to this revision.May 10 2019, 3:03 PM
dfaure added inline comments.
src/widgets/kdynamicjobtracker.cpp
165

This would fail if the registerJob didn't happen yet.

Imagine a very short lived job (or a very slow kuiserver).

  • register -> waiting for reply on requiresJobTracker
  • unregister -> calling unregisterJob immediately, kuiserver will ignore it
  • reply comes in, lambda calls registerJob

(note that the job is deleted with deleteLater, so the QPointer check doesn't help)

Result: the job stays up forever in kuiserver

Making things async means queueing requests, and having a sort of state machinne...

This revision now requires changes to proceed.May 10 2019, 3:03 PM
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