Skip to content
Snippets Groups Projects

WIP: Deprecate ExoJob and ExoSimpleJob (#58)

Closed Yongha Hwang requested to merge MShrimp4/exo:deprecate_exo_job into master
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Yongha Hwang changed title from Deprecate ExoTask and ExoSimpleTask (#58) to Deprecate ExoJob and ExoSimpleJob (#58)

    changed title from Deprecate ExoTask and ExoSimpleTask (#58) to Deprecate ExoJob and ExoSimpleJob (#58)

  • Yongha Hwang added 1 commit

    added 1 commit

    • 34cdfd5a - Deprecate ExoJob and ExoSimpleJob

    Compare with previous version

  • Yongha Hwang marked this merge request as draft

    marked this merge request as draft

    • Does this still makes sense? I mean, is GTask a drop-in replacement for ExoJob?

      I got the following warnings when building:

      DOC   Building XML
      ../../exo/exo-binding.c:93: warning: ExoBinding is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.)
      ../../exo/exo-binding.c:108: warning: ExoMutualBinding is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.)
      ../../exo-open/main.c:58: warning: Symbol name not found at the start of the comment block.
      ./exo-unused.txt:1: warning: 160 unused declarations. They should be added to exo-sections.txt in the appropriate place.
      Edited by Andre Miranda
    • I think generally it makes sense to use GTask over exo-selfmade stuff, even if it is no drop-in replacement, Just because it will reduce maintenance effort for Xfce.

      Though probably this concrete MR can be closed for now, since the 'masterplan' on how to do it changed meanwhile. All the details are discussed in #58

      Edited by Alexander Schwinn
    • Great, thanks for the explanation, I'll try to migrate screenshooter to GTask (someday).

    • Great, thanks for the explanation, I'll try to migrate screenshooter to GTask (someday).

      I tried this, no success, ExoJob supports a nice way of triggering signals which I couldn't figure out how to replace with GTask, it seems to support either a successful or error result.

      Pointers and good references are welcome.

    • Humm, so far I did not look into it in detail. @MShrimp4 was diving into it (ping, if you are still interested)

      I suppose if GTask is missing some features, it might make sense to wrap it with a new 'XfceTask' construct in libxfce4util which adds the missing functionality.

    • Author Maintainer

      @andreldm Looks like vanilla GTask lacks such a helper function. I should add xfce_g_task_emit() or something similar.

      Function of exo_job_emit():

      1. Packs va_list into a struct
      2. Calls g_io_scheduler_job_send_to_mainloop (deprecated, can be easily replaced with g_main_context_invoke_full())
      3. In main context, exo_job_emit_valist_in_mainloop() emits signal (g_signal_emit_valist())
      Edited by Yongha Hwang
    • Author Maintainer

      I created a new branch of libxfce4util to create xfce_g_task_emit(). It is not a direct in-place replacement since GTask only manages asynchronous job execution. The difference is that xfce_g_task_emit() would trigger a signal of the source object (as returned by g_task_get_source_object()).

      I have not tested the function though. (only tested compilation)

    • Thanks alot @MShrimp4 ! Hope I will find some time soon to take a closer look at it.

    • +1, the concept seems solid, I'll have a look at it as soon as possible.

    • Please register or sign in to reply
  • Alexander Schwinn mentioned in issue #58

    mentioned in issue #58

  • Andre Miranda resolved all threads

    resolved all threads

Please register or sign in to reply
Loading