D29385: Introduce KIO::OpenUrlJob, a rewrite and replacement for KRun

David Faure noreply at phabricator.kde.org
Sun May 3 21:37:26 BST 2020


dfaure added a comment.


  In D29385#662439 <https://phabricator.kde.org/D29385#662439>, @feverfew wrote:
  
  > Ahhh yes correct. Seeming as these jobs are now async (unlike KRun IIRC?), it isn't a problem that `resultingArguments` makes several blocking calls to the KIOFuse daemon?
  
  
  Some of KRun was async too ("new KRun" was async, the static methods like runUrl and others were not).
  The blocking calls in resultingArguments() don't make things worse for OpenUrlJob than it was for KRun, but of course the fact that the job is async is an opportunity to do everything async.
  The problem is that we can't get rid of KRun just yet....
  
  Async on top of sync works -- but still blocks the GUI thread so it's not perfect. Sync on top of async requires awful eventloop hacks which are often the source of nasty bugs.
  
  Solution 1: we write an async version of DesktopExecParser, keeping the existing one for KRun.
  Solution 2: we wait until KRun is gone (KF6) to make DesktopExecParser async.
  
  (I'm skipping non-solutions like event loop hacks in KRun or using the fact that nobody seems to really care for the PIDs or "bool success" returned by KRun so we could just make KRun "fire and forget" the underlying jobs and always return success).
  
  Basically this means rewriting DesktopExecParser as a KJob. Are you up for it? ;-)
  I can provide guidance, but I really care about FUSE enough myself to test a rewrite if I'd have to write it.
  Or I write, you test ;)

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D29385

To: dfaure, ahmadsamir, broulik, meven, kossebau, davidedmundson, nicolasfella, svuorela
Cc: feverfew, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200503/51489023/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list